Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Performance diff in using IN and OR in select query

Former Member
0 Likes
841

Hello

Is there any performance optimization in using IN instead of OR in where clause in a select query ? IF yes how ?

for ex : Select

from

into table

where x IN (a, b , c)

&

Select

from

into table

where x = a OR

x = b OR

x = c.

Thanks in advance

- Nilesh

7 REPLIES 7
Read only

Former Member
0 Likes
807

Hi,

You can check the performance by writting this code and executing...

with the use of tools : SE30: Run time analysis: This gives the load on database and appl server

ST05: This is SQL trace for abap select queries

You can compare the results and decide which one to go on ur own..

Hope this helps

Regards

Shiva

Read only

Former Member
0 Likes
807

This message was moderated.

Read only

Former Member
0 Likes
807

This message was moderated.

Read only

0 Likes
807

Hey thanks AKASH

I got the concept now...but as u said CONCATENATION STRATEGY is used in both these cases.

can u tell me what all other strategies are used in other cases...any documentations any link abt the same ?

so that i can get insights about internal operations of the select/modify / update / modify statemetns ?

awaiting your response.

Thanks in advance

NIlesh

Read only

matt
Active Contributor
0 Likes
807

Akash's posts have been rejected as they were copy pastes of other people's work, which is absolutely forbidden in these forums, as well as being rather dishonest.

matt

Read only

0 Likes
807

Hello

I will be highly obliged if anyone atleast suggest me the links instead of the direct material so as NOT to violate any rules or policies of the forums.

Thanks in advance

Nilesh

Read only

0 Likes
807

>

> Hello

> I will be highly obliged if anyone atleast suggest me the links instead of the direct material so as NOT to violate any rules or policies of the forums.

> Thanks in advance

> Nilesh

Hi, Nilesh

Suggesting Link is also against the Rules if some one can find for that link than why you can't search yourself for these helpful links ? so always do Search yourself and don't think from other to provide you Links, Please.

Faisal