<?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 Order in where clause - SQL statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-in-where-clause-sql-statement/m-p/2639825#M607658</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;The order of the fields in Where clause in OpenSQL statements is important to get the right index?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select a b c from t1 &lt;/P&gt;&lt;P&gt;where  &lt;/P&gt;&lt;P&gt;d = p_d and &lt;/P&gt;&lt;P&gt;e = p_e&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select a b c from t1 &lt;/P&gt;&lt;P&gt;where  &lt;/P&gt;&lt;P&gt;e = p_e and&lt;/P&gt;&lt;P&gt;d = p_d &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Index:&lt;/P&gt;&lt;P&gt;columns e and d.&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, 08 Aug 2007 19:33:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-08T19:33:43Z</dc:date>
    <item>
      <title>Order in where clause - SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-in-where-clause-sql-statement/m-p/2639825#M607658</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;The order of the fields in Where clause in OpenSQL statements is important to get the right index?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select a b c from t1 &lt;/P&gt;&lt;P&gt;where  &lt;/P&gt;&lt;P&gt;d = p_d and &lt;/P&gt;&lt;P&gt;e = p_e&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select a b c from t1 &lt;/P&gt;&lt;P&gt;where  &lt;/P&gt;&lt;P&gt;e = p_e and&lt;/P&gt;&lt;P&gt;d = p_d &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Index:&lt;/P&gt;&lt;P&gt;columns e and d.&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, 08 Aug 2007 19:33:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-in-where-clause-sql-statement/m-p/2639825#M607658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T19:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Order in where clause - SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-in-where-clause-sql-statement/m-p/2639826#M607659</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;  Both will give you the same result.. but it is always good to pass the sequence as in the table.. the performance will be good when you follow the sequece of occurance of the fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 19:35:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-in-where-clause-sql-statement/m-p/2639826#M607659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T19:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Order in where clause - SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-in-where-clause-sql-statement/m-p/2639827#M607660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It should be better to provide the fields for the WHERE statement in order...That way the table can be accessed faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 19:36:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-in-where-clause-sql-statement/m-p/2639827#M607660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T19:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Order in where clause - SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-in-where-clause-sql-statement/m-p/2639828#M607661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a duplicate post - please check my answer in the other one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 19:38:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-in-where-clause-sql-statement/m-p/2639828#M607661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T19:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Order in where clause - SQL statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-in-where-clause-sql-statement/m-p/2639829#M607662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2007 19:58:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-in-where-clause-sql-statement/m-p/2639829#M607662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-08T19:58:21Z</dc:date>
    </item>
  </channel>
</rss>

