<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Difference between using IN and an inner OR in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-using-in-and-an-inner-or/m-p/2234148#M481007</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using IN will enhance the speed as the evaluation of the logical expression is faster .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when many ORs are joined , the evaluation is not as fast and the query takes more time .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Apr 2007 05:42:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-25T05:42:25Z</dc:date>
    <item>
      <title>Difference between using IN and an inner OR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-using-in-and-an-inner-or/m-p/2234147#M481006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to know what's the difference between using IN and an inner OR in SQL statements.&lt;/P&gt;&lt;P&gt;I need to know their affect on the load of database server and the application server.&lt;/P&gt;&lt;P&gt;Hope someone can help me. Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For using Inner OR:&lt;/P&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;FROM SFLIGHT&lt;/P&gt;&lt;P&gt;INTO SFLIGHT_WA&lt;/P&gt;&lt;P&gt;WHERE CARRID = 'LH'&lt;/P&gt;&lt;P&gt;AND ( CONNID = '0300' OR&lt;/P&gt;&lt;P&gt;CONNID = '0302' )&lt;/P&gt;&lt;P&gt;AND FLDATE LIKE '2003%'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For using IN operator:&lt;/P&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;FROM SFLIGHT&lt;/P&gt;&lt;P&gt;INTO SFLIGHT_WA&lt;/P&gt;&lt;P&gt;WHERE CARRID = 'LH'&lt;/P&gt;&lt;P&gt;AND CONNID IN ('0300', '0302')&lt;/P&gt;&lt;P&gt;AND FLDATE LIKE '2003%'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 03:49:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-using-in-and-an-inner-or/m-p/2234147#M481006</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T03:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between using IN and an inner OR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-using-in-and-an-inner-or/m-p/2234148#M481007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using IN will enhance the speed as the evaluation of the logical expression is faster .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when many ORs are joined , the evaluation is not as fast and the query takes more time .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 05:42:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-using-in-and-an-inner-or/m-p/2234148#M481007</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T05:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between using IN and an inner OR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-using-in-and-an-inner-or/m-p/2234149#M481008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think if you are using IN there will be an addtional process of conversion of OPEN sql to Native SQL. While if you use inner-OR, it will be directly executed as native SQL. &lt;/P&gt;&lt;P&gt;'IN' : additional load on Apps server&lt;/P&gt;&lt;P&gt;'OR': no additional load on Apps server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not very sure if IN will improve the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Experts....Please correct me if I am wrong &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vishal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 05:49:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-using-in-and-an-inner-or/m-p/2234149#M481008</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T05:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between using IN and an inner OR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-using-in-and-an-inner-or/m-p/2234150#M481009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;Using OR&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;The optimizer usually stops working when an 'OR expression' occurs in the condition. This means that the columns checked using OR are not included in the index search. An exception to this are 'OR expressions' at the outside of conditions. &lt;/P&gt;&lt;P&gt;You should try to reformulate conditions that apply 'OR expressions' to columns relevant to the index into an IN condition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 07:58:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-using-in-and-an-inner-or/m-p/2234150#M481009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T07:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between using IN and an inner OR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-using-in-and-an-inner-or/m-p/2234151#M481010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The performance of using IN operater is faster than using inner OR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other idea of what is the difference between this two?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for reply &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 08:30:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-using-in-and-an-inner-or/m-p/2234151#M481010</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T08:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between using IN and an inner OR</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-using-in-and-an-inner-or/m-p/2234152#M481011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you do runtime analysis for each select statement, both are taking ABAP excecution time more or less same only 2 % variation is there&lt;/P&gt;&lt;P&gt;database excecution time less if you use IN when compare to OR operator.&lt;/P&gt;&lt;P&gt;There is 9% variation.&lt;/P&gt;&lt;P&gt;So definitely IN is more efficient than OR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 10:10:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-using-in-and-an-inner-or/m-p/2234152#M481011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T10:10:19Z</dc:date>
    </item>
  </channel>
</rss>

