<?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 Best performance select condition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/best-performance-select-condition/m-p/11476869#M1930989</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys.&lt;/P&gt;&lt;P&gt;I would like to listen your opinion on this performance issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement to do a select on a Z table that has the &lt;STRONG&gt;primary key fields A, B and C&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The selection is based on the fields D, E, F, G and there exist an index for these four fields combined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data selection is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; - &lt;STRONG&gt;field D = 01,&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; - field F is 'S',&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if E = 001 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F is ''&lt;SPAN style="font-size: 10pt;"&gt;or 'E' if E = 002 or 003&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; - field G is in range_g&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, what's the best selection for this? Would it be better to:&lt;/P&gt;&lt;P&gt; - use where condition with D = 01 and ( ( E = 001 and F = 'S') or ( E in (002, 003) and F in ('',E)) and G in range_g?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; - use two separated selects? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would really appreciate your opinion!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Alm.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jan 2016 11:38:14 GMT</pubDate>
    <dc:creator>flvia_s</dc:creator>
    <dc:date>2016-01-26T11:38:14Z</dc:date>
    <item>
      <title>Best performance select condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/best-performance-select-condition/m-p/11476869#M1930989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys.&lt;/P&gt;&lt;P&gt;I would like to listen your opinion on this performance issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement to do a select on a Z table that has the &lt;STRONG&gt;primary key fields A, B and C&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The selection is based on the fields D, E, F, G and there exist an index for these four fields combined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data selection is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; - &lt;STRONG&gt;field D = 01,&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; - field F is 'S',&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if E = 001 &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F is ''&lt;SPAN style="font-size: 10pt;"&gt;or 'E' if E = 002 or 003&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; - field G is in range_g&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, what's the best selection for this? Would it be better to:&lt;/P&gt;&lt;P&gt; - use where condition with D = 01 and ( ( E = 001 and F = 'S') or ( E in (002, 003) and F in ('',E)) and G in range_g?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; - use two separated selects? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would really appreciate your opinion!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Alm.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2016 11:38:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/best-performance-select-condition/m-p/11476869#M1930989</guid>
      <dc:creator>flvia_s</dc:creator>
      <dc:date>2016-01-26T11:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Best performance select condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/best-performance-select-condition/m-p/11476870#M1930990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried the different approaches and traced them through ST05? It's actually impossible for anyone to give a definitive answer as the performance depends very much on the data in the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2016 11:49:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/best-performance-select-condition/m-p/11476870#M1930990</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2016-01-26T11:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Best performance select condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/best-performance-select-condition/m-p/11476871#M1930991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew, the thing is that the table is new, so there is no data enough to test it...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2016 11:52:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/best-performance-select-condition/m-p/11476871#M1930991</guid>
      <dc:creator>flvia_s</dc:creator>
      <dc:date>2016-01-26T11:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Best performance select condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/best-performance-select-condition/m-p/11476872#M1930992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nonetheless. It's still impossible to give a definitive answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write a program to put some data in it that's as realistic as possible. Then run ST05 sql trace on all the possibilities and see how the database optimiser handles it - which indexes are used and the performance. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2016 11:54:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/best-performance-select-condition/m-p/11476872#M1930992</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2016-01-26T11:54:45Z</dc:date>
    </item>
  </channel>
</rss>

