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
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-mat