<?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: Performance issue select from cosp in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779643#M1678203</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or &lt;/P&gt;&lt;P&gt;- if empty range create a single record with a SELECT MIN( bukrs ) MAX( bukrs) INTO (tab_bukrs-low, tab_bukrs-high) FROM T001, tab_bukrs-sign = 'I', tab_bukrs-option = 'BT', APPEND tab_bukrs. (Especially if many company in the system)&lt;/P&gt;&lt;P&gt;- (if no other solution) use a SQL hint to force usage of the index (e.g. %_HINTS ORACLE 'INDEX("COSP~2")' for Oracle)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jun 2012 14:02:32 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2012-06-26T14:02:32Z</dc:date>
    <item>
      <title>Performance issue select from cosp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779635#M1678195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt; Hi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Below select statment giving performance issue.I commented select * ,although getting performance issue .Could u please let&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;me know How can I improve this select?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;SELECT lednr objnr gjahr wrttp versn kstar rkft vrgng&amp;nbsp; vbund pargb&lt;/P&gt;&lt;P&gt; beknz twaer perbl wog001 wog002 wog003 wog004 wog005 wog006&lt;/P&gt;&lt;P&gt;wog007 wog008 wog009 wog010 wog011 wog012 timestmp bukrs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTO TABLE gt_cosp&lt;/P&gt;&lt;P&gt;FROM cosp&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN gt_glt0_t&lt;/P&gt;&lt;P&gt;WHERE bukrs IN tab_bukrs&lt;/P&gt;&lt;P&gt;AND gjahr EQ p_ryear&lt;/P&gt;&lt;P&gt;AND wrttp EQ gc_wrttp_04&lt;/P&gt;&lt;P&gt;AND versn EQ gc_versn_000&lt;/P&gt;&lt;P&gt;AND lednr EQ gc_lednr_00&lt;/P&gt;&lt;P&gt;AND kstar EQ gt_glt0_t-racct.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Moderator Message: Added Code Tags.&amp;nbsp;&amp;nbsp; Please share more information from the "SQL Trace Details".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Kesavadas Thekkillath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 10:57:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779635#M1678195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-26T10:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue select from cosp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779636#M1678196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Susrikant ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have u check that &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;gt_glt0_t&lt;/SPAN&gt; is not intial , and the parameters with which u are using in where condition are also not initial .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try preparing a secondary index for table COSP , according to your where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yogendra Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 11:05:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779636#M1678196</guid>
      <dc:creator>yogendra_bhaskar</dc:creator>
      <dc:date>2012-06-26T11:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue select from cosp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779637#M1678197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi suskranth sahooo,&lt;/P&gt;&lt;P&gt; u will select the data as for the sap standard table format.&lt;/P&gt;&lt;P&gt;solved ur problems.&lt;/P&gt;&lt;P&gt;good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 11:29:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779637#M1678197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-26T11:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue select from cosp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779638#M1678198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check activation of index COSP~2 in your system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 11:42:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779638#M1678198</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2012-06-26T11:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue select from cosp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779639#M1678199</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;Its already activated ..Can we create any other secondary index for this ..pl.. help me if yes how to do it &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 11:52:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779639#M1678199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-26T11:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue select from cosp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779640#M1678200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;put a condition around this statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF gt_glt0_t[] is not initial.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select statement.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes, Index number 2 should be active.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 12:25:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779640#M1678200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-26T12:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue select from cosp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779641#M1678201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, does your index COSP~2 have the following structure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Index name:&lt;BR /&gt;COSP~2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Index fields:&lt;/P&gt;&lt;P&gt;MANDT&lt;BR /&gt;BUKRS&lt;/P&gt;&lt;P&gt;GJAHR&lt;/P&gt;&lt;P&gt;WRTTP&lt;/P&gt;&lt;P&gt;VERSN&lt;/P&gt;&lt;P&gt;LEDNR&lt;/P&gt;&lt;P&gt;KSTAR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes and it DOES exist on the database level (check that too), then there should not be any performance problems. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 12:27:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779641#M1678201</guid>
      <dc:creator>yuri_ziryukin</dc:creator>
      <dc:date>2012-06-26T12:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue select from cosp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779642#M1678202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the problem is in the condition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE bukrs IN tab_bukrs&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If TAB_BUKRS is empty, the SELECT will likely not use the index. Either make sure it has the values you want or fill it with &lt;SPAN style="text-decoration: underline;"&gt;all &lt;/SPAN&gt;values from table T001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 13:50:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779642#M1678202</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-26T13:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue select from cosp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779643#M1678203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or &lt;/P&gt;&lt;P&gt;- if empty range create a single record with a SELECT MIN( bukrs ) MAX( bukrs) INTO (tab_bukrs-low, tab_bukrs-high) FROM T001, tab_bukrs-sign = 'I', tab_bukrs-option = 'BT', APPEND tab_bukrs. (Especially if many company in the system)&lt;/P&gt;&lt;P&gt;- (if no other solution) use a SQL hint to force usage of the index (e.g. %_HINTS ORACLE 'INDEX("COSP~2")' for Oracle)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 14:02:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779643#M1678203</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2012-06-26T14:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue select from cosp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779644#M1678204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using a hint to force COSP~2 with no BUKRS likely won't work because BUKRS is the first field in the index. If that index is used with no BUKRS, I don't see how it could help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 14:18:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779644#M1678204</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-26T14:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue select from cosp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779645#M1678205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oops, i forgot to put an "else" between my two answers &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/825/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt; (else if not related to empty bukrs table)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 14:32:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779645#M1678205</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2012-06-26T14:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue select from cosp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779646#M1678206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check execution plan at database level&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Roman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2012 07:39:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-select-from-cosp/m-p/8779646#M1678206</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-27T07:39:27Z</dc:date>
    </item>
  </channel>
</rss>

