电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

ABAP效率问题(forallentriesin)

ABAP效率问题(forallentriesin)_第1页
1/6
ABAP效率问题(forallentriesin)_第2页
2/6
ABAP效率问题(forallentriesin)_第3页
3/6
FOR ALL ENTRIES 的效率问题 FOR ALL ENTRIES vs DB2 JOIN All abap programers and most of the dba's that support abap programmers are familiar with the abap clause "for all entries". Most of the web pages I visited recently, discuss 3 major drawbacks of the "for all entries" clause: 1. duplicate rows are automatically removed 2. if the itab used in the clause is empty , all the rows in the source table will be selected . 3. performance degradation when using the clause on big tables. In this post I'd like to shed some light on the third issue. Specifically i'll discuss the use of the "for all entries" clause as a means to join tables in the abap code instead of in db2. Say for example you have the following abap code: Select * from mara For all entries in itab Where matnr = itab-matnr. If the actual source of the material list (represented here by itab) is actually another database table, like: select matnr from mseg into corresponding fields of table itab where ? Then you could have used one sql statement that joins both tables. Select t1.* From mara t1, mseg t2 Where t1.matnr = t2.matnr And T2?. So what are the drawbacks of using the "for all entires" instead of a join ? At run time , in order to fulfill the "for all entries " request, the abap engine will generate several sql statements (for detailed information on this refer to note 48230). Regardless of which method the engine uses (union all, "or" or "in" predicates) If the itab is bigger then a few records, the abap engine will break the itab into parts, and rerun an sql statement several times in a loop. This rerun of the same sql statement , each time with different host values, is a source of resource w...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

ABAP效率问题(forallentriesin)

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部