全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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湖北省事业单位联考招聘(6434人)易考易错模拟试题(共500题)试卷后附参考答案
- 2025年营养师七级职业技能鉴定模拟试题及答案
- 2025年山西中考原版试卷及答案
- 2025四川营华物业管理有限公司招聘劳务人员及拟录用人员笔试历年难易错考点试卷带答案解析2套试卷
- 2025四川绵阳长虹美菱中国区营销总部招聘空调营销事业部市场部新媒体运营岗测试笔试历年典型考点题库附带答案详解2套试卷
- 2025四川绵阳科技城发展投资(集团)有限公司延长招聘会计等岗位人员考试历年高频难点与易错点集合带答案解析(3卷合一)
- 2025四川绵阳市康来物业服务有限公司招聘各项目部秩序等项目一线岗位拟录用人员笔试历年常考点试题专练附带答案详解2套试卷
- 2025四川富润教科投资集团有限公司部分岗位招聘4人笔试历年备考题库附带答案详解2套试卷
- 2025四川华丰科技股份有限公司招聘精益工程师岗位1人笔试历年典型考点题库附带答案详解2套试卷
- 2025内蒙古呼和浩特市健君医疗器械有限责任公司赛罕区分公司招聘笔试历年难易错考点试卷带答案解析2套试卷
- 天然气安全技术说明书MSDS
- 《Micro LED光学特性测试方法》
- MOOC 人工智能原理-北京大学 中国大学慕课答案
- 乳腺癌转移护理查房
- 医保政策讲解与培训课件
- 无人机快递技术-无人机的应用
- 白茶及加工工艺
- 教师读书记录表
- 质量控制计划QCP
- 避暑山庄汇编课件
- 第八章-材料工程-伦理问题-全
评论
0/150
提交评论