Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8950

Re: Performance in a Select with OR Clause

$
0
0

Hi Rebeca,


As per SAP recommendation it is not advisable to use OR condition in Select Query  statement the reason is ,


Using OR condition implies that the Query need to executed twice to satisfy the OR condition and as a result this will impact your performance.To avoid this we shall use Ranges so that the query will be executed only once as below .


SELECT value_new FROM cdpos

         INTO TABLE it_table

         FOR ALL ENTRIES IN it_table1

         WHERE objectid = it_modif-objectid AND

                 changenr = it_modif-changenr AND

                 ( fname in lr_fname).

where lr_fname should be range table including both the values to be validated.

 

Regards,

Vinodkumar.


Viewing all articles
Browse latest Browse all 8950

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>