全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
abap 程序优化点滴 1、使用where语句 不推荐Select * from zflight.Check : zflight-airln = LF and zflight-fligh = BW222.Endselect.推荐Select * from zflight where airln = LF and fligh = 222.Endselect.2、使用聚合函数不推荐Maxnu = 0.Select * from zflight where airln = LF and cntry = IN.Check zflight-fligh maxnu.Maxnu = zflight-fligh.Endselect.推荐Select max( fligh ) from zflight into maxnu where airln = LF and cntry = IN.3、使用视图代替基本表查询不推荐Select * from zcntry where cntry like IN%.Select single * from zflight where cntry = zcntry-cntry and airln = LF.Endselect.推荐Select * from zcnfl where cntry like IN% and airln = LF.Endselect.4、使用INTO table 代替select endselect不推荐Refresh: int_fligh.Select * from zflight into int_fligh.Append int_fligh. Clear int_fligh.Endselect.推荐Refresh: int_fligh.Select * from zflight into table int_fligh.5、使用批量修改内表代替逐行修改不推荐Loop at int_fligh.If int_fligh-flag is initial.Int_fligh-flag = X.Endif.Modify int_fligh.Endloop.推荐Int_fligh-flag = X.Modify int_fligh transporting flag where flag is initial.6、使用二分法查询,提高查询内表数据速度不推荐Read table int_fligh with key airln = LF.推荐Read table int_fligh with key airln = LF binary search.7、两个内表添加使用批量增加代替逐行不推荐Loop at int_fligh1.Append int_fligh1 to int_fligh2.Endloop.推荐Append lines of int_fligh1 to int_fligh2.8、使用table bufferingUse of buffered tables is recommended to improve the performance considerably. The buffer is bypassed while using the following statementsSelect distinct Select for update Order by, group by, having clause Joins Use the Bypass buffer addition to the select clause in order to explicitly bypass the buffer while selecting the data.9、 使用FOR ALL Entries不推荐Loop at int_cntry. Select single * from zfligh into int_fligh where cntry = int_cntry-cntry. Append int_fligh. Endloop.推荐Select * from zfligh appending table int_flighFor all entries in int_cntry Where cntry = int_cntry-cntry.10、正确地使用where语句,使查询能使用索引When a base table has multiple indices, the where clause should be in the order of the index, either a primary or a secondary indexTo choose an index, the optimizer checks the field names specified in the where clause and then uses an index that has the same order of the fields. One more tip is that if a table begins with MANDT, while an index does not, there is a high possibility that the optimizer might not use that index.11、正确地使用MOVE语句Instead of using the move-corresponding clause it is advisable to use the move statement instead. Attempt should be made to move entire internal table headers in a single shot, rather than moving the fields one by one.12、正确地使用inner joinLet us take an example of 2 tables, zairln and zflight. The table zairln has the field airln, which is the airline code and the field lnnam, which is the name of the airline. The table zflight has the field airln, the airline code and other fields which hold the details of the flights that an airline operates.Since these 2 tables a re logically joined by the airln field, it is advisable to use the inner join.Select aairln alnnam bfligh bcntry into table int_airdetFrom zairln as a inner join zflight as b on aairln = bairln.In order to restrict the data as per the se
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 光伏设备技术培训
- 林草局考试简述题及答案
- 光伏电站安全培训总结课件
- 2025-2026学年陕西省西安市新城区北师大版五年级上册10月月考数学试卷(含解析)
- 概率统计试题及答案
- 【初中 物理】跨学科实践:制作微型密度计课件-2025-2026学年人教版物理八年级下册
- 2026年中山市民众街道浪网小学招聘临聘教师备考题库完整答案详解
- 深度解析(2026)《GBT 34035-2017热电偶现场试验方法》
- 深度解析(2026)《GBT 34001-2016中国修船质量标准》
- 2026年立人教育招聘小学语文、数学、英语、音乐、体育教师备考题库及答案详解1套
- 中图版地理七年级上册知识总结
- 大连理工大学固态相变各章节考点及知识点总节
- 统编版四年级下册语文第二单元表格式教案
- 2022年12月华中科技大学科学技术发展院基地办招聘1名社会用工笔试参考题库含答案解析
- 测量系统线性分析数据表
- 第三单元课外古诗词诵读《太常引·建康中秋夜为吕叔潜赋》课件
- GB/T 5836.1-1992建筑排水用硬聚氯乙烯管材
- GB/T 23445-2009聚合物水泥防水涂料
- 美国COMPASS电磁导航产品介绍课件
- 论文写作讲座课件
- 危险化学品-培训-课件
评论
0/150
提交评论