<?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: Primary Key - Optimization Doubt in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-optimization-doubt/m-p/5711424#M1296632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was just a example .. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just want tro know That when i dont have any ebeln to pass in the query, passing a value GE initial for ebeln , will it increase the performance atleast to some extent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;query 1 without ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln bukrs into table itab where bukrs in s_bukrs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;query 1 with ebeln ge initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln bukrs into table itab &lt;/P&gt;&lt;P&gt;where ebeln ge v_ebeln&lt;/P&gt;&lt;P&gt;bukrs in s_bukrs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 13 Jun 2009 07:20:10 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2009-06-13T07:20:10Z</dc:date>
    <item>
      <title>Primary Key - Optimization Doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-optimization-doubt/m-p/5711422#M1296630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suupose i dont have a primary key field for a select query and if i write it like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data:v_ebeln type ekko-ebeln value is initial.

select ebeln bukrs from ekko
into table it_ekko
where ebeln ge v_ebeln   &amp;lt;-------------
and bukrs in s_bukrs.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do this improve performance ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jun 2009 06:44:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-optimization-doubt/m-p/5711422#M1296630</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-06-13T06:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Primary Key - Optimization Doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-optimization-doubt/m-p/5711423#M1296631</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;It will not increase performance, you should include some other fields to restrict the number of records fetched such as document type or category. So better leave vbeln from the where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what is the purpose of this query?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jun 2009 07:13:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-optimization-doubt/m-p/5711423#M1296631</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-13T07:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Primary Key - Optimization Doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-optimization-doubt/m-p/5711424#M1296632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was just a example .. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just want tro know That when i dont have any ebeln to pass in the query, passing a value GE initial for ebeln , will it increase the performance atleast to some extent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;query 1 without ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln bukrs into table itab where bukrs in s_bukrs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;query 1 with ebeln ge initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln bukrs into table itab &lt;/P&gt;&lt;P&gt;where ebeln ge v_ebeln&lt;/P&gt;&lt;P&gt;bukrs in s_bukrs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jun 2009 07:20:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-optimization-doubt/m-p/5711424#M1296632</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-06-13T07:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Primary Key - Optimization Doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-optimization-doubt/m-p/5711425#M1296633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you should try your example in your system! There you can learn nmore than by asking here &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Use the SQl-Trace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question is more complicated than you think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The addition of the condition can influence the optimizer, but not all optimizers behave the same, &lt;/P&gt;&lt;P&gt;therefore check your own.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The optimizer does not see whether the value is initial or something else, it sees only the condition with a host variable. So it counts he condtion in the same way as a GE '99999' or whatever.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are additional conditions then this condition can influence the otimizer to use another access path, which can change the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case it can happend that the access changes from full table scan to index access, but not neccessarily.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in execution the condition does not help, it does not restrict anything, it can even happen that the &lt;/P&gt;&lt;P&gt;access becomes slower.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jun 2009 08:06:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-optimization-doubt/m-p/5711425#M1296633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-13T08:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Primary Key - Optimization Doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-optimization-doubt/m-p/5711426#M1296634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; But in execution the condition does not help, it does not restrict anything, it can even happen that the &lt;/P&gt;&lt;P&gt;&amp;gt; access becomes slower.&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Siegfried&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exactly, in my system the query with vbeln condition is taking more time than the one without that condition. So better don't give anything if you don't have primary key fields to pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karthik D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Jun 2009 09:07:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-optimization-doubt/m-p/5711426#M1296634</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-13T09:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: Primary Key - Optimization Doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-optimization-doubt/m-p/5711427#M1296635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Karthik and Siegfried,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As said it differs, from qmel its picking data a bit faster when passed with 'qmnum' but with ebeln in ekpo its slow as karthik said....Any ways Thanks for ur suggestions &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keshav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Jun 2009 08:56:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-optimization-doubt/m-p/5711427#M1296635</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-06-14T08:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Primary Key - Optimization Doubt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-optimization-doubt/m-p/5711428#M1296636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got a clear View on this &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 06:32:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-key-optimization-doubt/m-p/5711428#M1296636</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-06-16T06:32:30Z</dc:date>
    </item>
  </channel>
</rss>

