


全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
如何调整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 s
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年婴幼儿配方食品营养配方中植物提取物对婴儿健康的影响报告
- 7.2.3常见的酸和碱说课稿-2025-2026学年九年级化学人教版下册
- 大数据精准营销模型构建成效与客户满意度鉴定报告(2025年)
- 2025年婴幼儿配方食品营养配方对儿童成长影响报告
- 废弃矿井资源再利用2025年技术路径与产业模式产业创新驱动因素优化报告
- 农村种植结构调整与指导服务协议
- 2.3 物质的量 教学设计 2023-2024学年高一上学期化学人教版(2019)必修第一册
- 区块链电子票据防伪溯源技术研究协议
- 第三单元第14课《网络身份认证》说课稿 2024-2025学年浙教版(2023)初中信息技术八年级上册
- 2025年清洁机器人行业需求分析及创新策略研究报告
- 新建洞室储气库压缩空气储能系统的经济性及成本分析
- 艺康servsafe培训课件
- 砖厂职业危害管理制度
- 肝功能障碍患者的麻醉管理要点
- 2025年粮油仓储管理员(高级)职业技能鉴定考试练习题库(含答案)
- 【课件】新高三启动主题班会:启航高三逐梦未来
- 历史 2024-2025学年部编版七年级历史下学期期末问答式复习提纲
- 2025年中国邮政集团有限公司北京分公司招聘笔试冲刺题(带答案解析)
- 学校物业服务应急事件处理预案
- 单位车辆管理委托协议书示例3篇
- 人工智能赋能教育:技术变革与教学创新
评论
0/150
提交评论