1、必须要判断for all entries in后面的内表是否为空,如果为空,where条件中与内表中字段进行比较的结果全部为真,会导致取出非常多的数据,影响系统性能。
2、使用for all entries in,对于最后得出的结果集系统会自动删除重复行(即使用了distinct)。如果要保留重复行记录,要在SELECT语句中添加足够的key(有必要时,增加全部key),以保证结果集中所需重复项目不会被删除。
3、对于内表中作为条件替换用项目,不能使用LIKE,BETWEEN,IN比较操作符。这些比较操作符都是不确定比较操作符(将选择条件设定在一个范围内),而 for all entries in 语句的作用相当于将选择条件块全部并列开来,用OR连接,如果每个OR分支中又是不确定的范围,那么系统性能将大大降低。
4、使用该语句时,ORDER BY语句和HAVING语句将不能使用。
5、使用该语句时,除COUNT( * )以外的所有合计函数(MAX,MIN,AVG,SUM)都不能使用。
6、使用 for all entries in 虽然在某些方面很方便的,但很耗内存。
7、itab-field作为占位符被替换,所以定义内表itab时不要使用with header line,以免造成混淆。
相关文章
- 启动tomcat出来两个窗口 NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=/=ALL-UNNAMED --add-
- 封装类(Merry May Day to all you who are burried in work ~)---2017-05-01
- databus编译:Could not resolve all dependencies for configuration ':databus2-relay:databus2-event-producer-mock:compile
- 当分页语句遇到union all
- Phalapi 中Union和Union All的用法
- LeetCode HashTable 30 Substring with Concatenation of All Words
- leetCode 30.Substring with Concatenation of All Words (words中全部子串相连) 解题思路和方法
- [leetcode]30. Substring with Concatenation of All Words由所有单词连成的子串
- [LeetCode] 30. Substring with Concatenation of All Words 串联所有单词的子串
- [LeetCode] 30. Substring with Concatenation of All Words 解题思路 - Java