<?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: SELECT with WHERE/JOIN: performance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-where-join-performance/m-p/11904159#M1962575</link>
    <description>&lt;P&gt;I did once get it the wrong way round and ended up running out of memory. &lt;/P&gt;</description>
    <pubDate>Fri, 10 May 2019 11:37:18 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2019-05-10T11:37:18Z</dc:date>
    <item>
      <title>SELECT with WHERE/JOIN: performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-where-join-performance/m-p/11904155#M1962571</link>
      <description>&lt;P&gt;Hi experts, I have a question on JOIN condition. Sometimes i need to insert the same fields in WHERE condition and in JOIN condition.&lt;/P&gt;
  &lt;P&gt;For example: &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;  SELECT        * 
         FROM kblk join kblp
              ON kblk~belnr eq kblp~belnr
         WHERE  kblk~belnr  eq lv_belnr
           AND  kblp~blpos  eq lv_blpos. &lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;My question is about performances of this select. What is processed before? Where or join? &lt;/P&gt;
  &lt;P&gt;If WHERE condition is processed before &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;JOIN
  SELECT        * 
         FROM  kblk join kblp
              ON kblk~belnr eq kblp~belnr
         WHERE  kblk~belnr  eq lv_belnr
           AND  kblp~belnr  eq lv_belnr
    AND  kblp~blpos  eq lv_blpos. &lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;is better because i can express all the key fields of table KBLP. &lt;/P&gt;
  &lt;P&gt;if JOIN condition is processed before WHERE the condition "kblp~belnr eq lv_belnr" is useless because of "kblk~belnr eq lv_belnr". The joined records already have the filter on belnr. &lt;/P&gt;
  &lt;P&gt;What is the best condition in performance?&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 08:13:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-where-join-performance/m-p/11904155#M1962571</guid>
      <dc:creator>gabriele_mazza</dc:creator>
      <dc:date>2019-05-10T08:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT with WHERE/JOIN: performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-where-join-performance/m-p/11904156#M1962572</link>
      <description>&lt;P&gt;Hi &lt;A href="https://answers.sap.com/users/18379/gabrielemazza.html"&gt;Gabriele&lt;/A&gt;, &lt;/P&gt;&lt;P&gt;coul you try ST05 to analyze the performance and compare between them which on is faster.&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 08:22:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-where-join-performance/m-p/11904156#M1962572</guid>
      <dc:creator>former_member184158</dc:creator>
      <dc:date>2019-05-10T08:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT with WHERE/JOIN: performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-where-join-performance/m-p/11904157#M1962573</link>
      <description>&lt;P&gt;In complement to what said &lt;A href="https://answers.sap.com/users/3135/ibrahimsapibrahim.html"&gt;Ebrahim Hatem&lt;/A&gt;, in ST05 you have the possibility to see the &lt;STRONG&gt;execution plan&lt;/STRONG&gt;, which tells you what the database decides in your conditions (might differ on other systems).&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 08:37:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-where-join-performance/m-p/11904157#M1962573</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-05-10T08:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT with WHERE/JOIN: performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-where-join-performance/m-p/11904158#M1962574</link>
      <description>&lt;P&gt;put F1 help on WHERE, i can see that its said:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;The addition WHERE restricts the number of lines included in the result set by the statement SELECT...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;so I think JOIN will evaluate first. But there are some discussions about it:&lt;/P&gt;&lt;P&gt;&lt;A href="https://dba.stackexchange.com/questions/5038/sql-server-join-where-processing-order" target="test_blank"&gt;https://dba.stackexchange.com/questions/5038/sql-server-join-where-processing-order&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 10:54:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-where-join-performance/m-p/11904158#M1962574</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2019-05-10T10:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT with WHERE/JOIN: performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-where-join-performance/m-p/11904159#M1962575</link>
      <description>&lt;P&gt;I did once get it the wrong way round and ended up running out of memory. &lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 11:37:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-where-join-performance/m-p/11904159#M1962575</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2019-05-10T11:37:18Z</dc:date>
    </item>
  </channel>
</rss>

