<?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: DATABASE performance is very high in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395096#M1405385</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;First of all create an index on table COSP - in the order &lt;/P&gt;&lt;P&gt;MANDT&lt;/P&gt;&lt;P&gt;LEDNR&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;KSTAR&lt;/P&gt;&lt;P&gt; then use the following -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT objnr gjahr kstar beknz twaer&lt;/P&gt;&lt;P&gt;wtg001 wtg002 wtg003 wtg004 wtg005 wtg006&lt;/P&gt;&lt;P&gt;wtg007 wtg008 wtg009 wtg010 wtg011 wtg012&lt;/P&gt;&lt;P&gt;wkg001 wkg002 wkg003 wkg004 wkg005 wkg006&lt;/P&gt;&lt;P&gt;wkg007 wkg008 wkg009 wkg010 wkg011 wkg012&lt;/P&gt;&lt;P&gt;wog001 wog002 wog003 wog004 wog005 wog006&lt;/P&gt;&lt;P&gt;wog007 wog008 wog009 wog010 wog011 wog012&lt;/P&gt;&lt;P&gt;FROM cosp Client specified APPENDING TABLE i_cosp_t PACKAGE SIZE 2000&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FOR ALL ENTRIES IN p_i_vbakp&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;WHERE MANDT = sy_mandt AND&lt;/P&gt;&lt;P&gt; lednr EQ c_lednr_0 AND&lt;/P&gt;&lt;P&gt;gjahr EQ p_gjahr AND wrttp EQ c_wrttp AND&lt;/P&gt;&lt;P&gt;versn EQ c_versn_0 AND kstar IN p_r_kstar_cosp.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then create an index on table COSS - in the order &lt;/P&gt;&lt;P&gt;MANDT&lt;/P&gt;&lt;P&gt;LEDNR&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;KSTAR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;READ TABLE COSS AND APPEND TO P_I_COSP FILLED ABOVE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT objnr gjahr kstar uspob beknz twaer&lt;/P&gt;&lt;P&gt;wtg001 wtg002 wtg003 wtg004 wtg005 wtg006&lt;/P&gt;&lt;P&gt;wtg007 wtg008 wtg009 wtg010 wtg011 wtg012&lt;/P&gt;&lt;P&gt;wkg001 wkg002 wkg003 wkg004 wkg005 wkg006&lt;/P&gt;&lt;P&gt;wkg007 wkg008 wkg009 wkg010 wkg011 wkg012&lt;/P&gt;&lt;P&gt;wog001 wog002 wog003 wog004 wog005 wog006&lt;/P&gt;&lt;P&gt;wog007 wog008 wog009 wog010 wog011 wog012&lt;/P&gt;&lt;P&gt;FROM coss APPENDING TABLE i_coss_t PACKAGE SIZE 2000&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FOR ALL ENTRIES IN p_i_vbakp&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;WHERE MANDT = sy-MANDT AND&lt;/P&gt;&lt;P&gt;lednr EQ c_lednr_0 AND gjahr EQ p_gjahr AND&lt;/P&gt;&lt;P&gt;wrttp EQ c_wrttp AND versn EQ c_versn_0 AND&lt;/P&gt;&lt;P&gt;kstar IN p_r_kstar_coss.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And also if possible avoid &lt;/P&gt;&lt;P&gt;SELECT--ENDSELECT.  Statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;&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;MADAN NAMDEO&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Dec 2009 05:26:15 GMT</pubDate>
    <dc:creator>former_member188686</dc:creator>
    <dc:date>2009-12-02T05:26:15Z</dc:date>
    <item>
      <title>DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395083#M1405372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  I'm having the following code. its performance is very high. Is it possible to reduce the processing time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT  objnr gjahr kstar beknz twaer&lt;/P&gt;&lt;P&gt;            wtg001 wtg002 wtg003 wtg004 wtg005 wtg006&lt;/P&gt;&lt;P&gt;            wtg007 wtg008 wtg009 wtg010 wtg011 wtg012&lt;/P&gt;&lt;P&gt;            wkg001 wkg002 wkg003 wkg004 wkg005 wkg006&lt;/P&gt;&lt;P&gt;            wkg007 wkg008 wkg009 wkg010 wkg011 wkg012&lt;/P&gt;&lt;P&gt;            wog001 wog002 wog003 wog004 wog005 wog006&lt;/P&gt;&lt;P&gt;            wog007 wog008 wog009 wog010 wog011 wog012&lt;/P&gt;&lt;P&gt;    FROM cosp APPENDING TABLE i_cosp_t PACKAGE SIZE 2000&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FOR ALL ENTRIES IN p_i_vbakp&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    WHERE lednr EQ c_lednr_0 AND&lt;/P&gt;&lt;P&gt;          versn EQ c_versn_0 AND&lt;/P&gt;&lt;P&gt;          gjahr EQ p_gjahr AND&lt;/P&gt;&lt;P&gt;          wrttp EQ c_wrttp AND&lt;/P&gt;&lt;P&gt;          kstar IN p_r_kstar_cosp.&lt;/P&gt;&lt;P&gt;    ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  READ TABLE COSS AND APPEND TO P_I_COSP FILLED ABOVE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    SELECT  objnr gjahr kstar  uspob beknz twaer&lt;/P&gt;&lt;P&gt;            wtg001 wtg002 wtg003 wtg004 wtg005 wtg006&lt;/P&gt;&lt;P&gt;            wtg007 wtg008 wtg009 wtg010 wtg011 wtg012&lt;/P&gt;&lt;P&gt;            wkg001 wkg002 wkg003 wkg004 wkg005 wkg006&lt;/P&gt;&lt;P&gt;            wkg007 wkg008 wkg009 wkg010 wkg011 wkg012&lt;/P&gt;&lt;P&gt;            wog001 wog002 wog003 wog004 wog005 wog006&lt;/P&gt;&lt;P&gt;            wog007 wog008 wog009 wog010 wog011 wog012&lt;/P&gt;&lt;P&gt;    FROM coss APPENDING TABLE i_coss_t PACKAGE SIZE 2000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FOR ALL ENTRIES IN p_i_vbakp&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    WHERE lednr EQ c_lednr_0 AND&lt;/P&gt;&lt;P&gt;          versn EQ c_versn_0 AND&lt;/P&gt;&lt;P&gt;          gjahr EQ p_gjahr AND&lt;/P&gt;&lt;P&gt;          wrttp EQ c_wrttp AND&lt;/P&gt;&lt;P&gt;          kstar IN p_r_kstar_coss.&lt;/P&gt;&lt;P&gt;    ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Vallamuthu.M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 05:31:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395083#M1405372</guid>
      <dc:creator>vallamuthu_madheswaran2</dc:creator>
      <dc:date>2009-12-01T05:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395084#M1405373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The fields in the where condition of select statement should be in the same order as similar to data base table.&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, 01 Dec 2009 06:39:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395084#M1405373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-01T06:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395085#M1405374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One Field is differnt but now i changed it 1% time is reduce. it's helpfull for me is there any other way to reduce?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Vallamuthu.M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 06:49:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395085#M1405374</guid>
      <dc:creator>vallamuthu_madheswaran2</dc:creator>
      <dc:date>2009-12-01T06:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395086#M1405375</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;Make sure that Cost Element range is sorted and lets try with increasing package size to 10000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 07:40:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395086#M1405375</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-01T07:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395087#M1405376</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;Can't you avoid SELECT-ENDSELECT ? Try declaring the size of the internal table initially .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 08:47:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395087#M1405376</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-01T08:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395088#M1405377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The is no difference while increasing the package size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Vallamuthu.M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 08:56:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395088#M1405377</guid>
      <dc:creator>vallamuthu_madheswaran2</dc:creator>
      <dc:date>2009-12-01T08:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395089#M1405378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you don't have the OBJNR key field, there is not much to do without building an index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You could also try to find the OBJNR values associated to the cost centers (CSKS-OBJNR and CSSL-OBJNR) and select from COSS and COSP via OBJNR, PAOBJ or USPOB fields.&lt;/EM&gt;&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, 01 Dec 2009 09:07:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395089#M1405378</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2009-12-01T09:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395090#M1405379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After getting the values we calculate the objnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Vallamuthu.M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 09:53:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395090#M1405379</guid>
      <dc:creator>vallamuthu_madheswaran2</dc:creator>
      <dc:date>2009-12-01T09:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395091#M1405380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your performance is not high, but very low, the requirement is high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please run an SQL trace and give the result of the SQL summary. Your problem is the support by the index, I guess.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 11:44:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395091#M1405380</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-01T11:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395092#M1405381</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; The fields in the where condition of select statement should be in the same order as similar to data base table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is a myth and incorrect.&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, 01 Dec 2009 14:09:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395092#M1405381</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-01T14:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395093#M1405382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Please see &lt;SPAN __jive_macro_name="thread" id="1283414"&gt;&lt;/SPAN&gt; before posting - thread locked&lt;/SPAN&gt;&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, 01 Dec 2009 14:10:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395093#M1405382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-01T14:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395094#M1405383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; This is a myth and incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, it is a myth, but it is still recommended. Performance is identical, but space used in cursor cache is different. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should use the order of the table such that identical statement at different coding positions can be identified as identical and use only one statement in the cursor cache.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 15:36:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395094#M1405383</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-01T15:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395095#M1405384</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; Yes, it is a myth, but it is still recommended. &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'd like to see where this is recommended ands how much performance would be bettered.&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, 01 Dec 2009 15:46:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395095#M1405384</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-01T15:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395096#M1405385</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;First of all create an index on table COSP - in the order &lt;/P&gt;&lt;P&gt;MANDT&lt;/P&gt;&lt;P&gt;LEDNR&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;KSTAR&lt;/P&gt;&lt;P&gt; then use the following -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT objnr gjahr kstar beknz twaer&lt;/P&gt;&lt;P&gt;wtg001 wtg002 wtg003 wtg004 wtg005 wtg006&lt;/P&gt;&lt;P&gt;wtg007 wtg008 wtg009 wtg010 wtg011 wtg012&lt;/P&gt;&lt;P&gt;wkg001 wkg002 wkg003 wkg004 wkg005 wkg006&lt;/P&gt;&lt;P&gt;wkg007 wkg008 wkg009 wkg010 wkg011 wkg012&lt;/P&gt;&lt;P&gt;wog001 wog002 wog003 wog004 wog005 wog006&lt;/P&gt;&lt;P&gt;wog007 wog008 wog009 wog010 wog011 wog012&lt;/P&gt;&lt;P&gt;FROM cosp Client specified APPENDING TABLE i_cosp_t PACKAGE SIZE 2000&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FOR ALL ENTRIES IN p_i_vbakp&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;WHERE MANDT = sy_mandt AND&lt;/P&gt;&lt;P&gt; lednr EQ c_lednr_0 AND&lt;/P&gt;&lt;P&gt;gjahr EQ p_gjahr AND wrttp EQ c_wrttp AND&lt;/P&gt;&lt;P&gt;versn EQ c_versn_0 AND kstar IN p_r_kstar_cosp.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then create an index on table COSS - in the order &lt;/P&gt;&lt;P&gt;MANDT&lt;/P&gt;&lt;P&gt;LEDNR&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;KSTAR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;READ TABLE COSS AND APPEND TO P_I_COSP FILLED ABOVE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT objnr gjahr kstar uspob beknz twaer&lt;/P&gt;&lt;P&gt;wtg001 wtg002 wtg003 wtg004 wtg005 wtg006&lt;/P&gt;&lt;P&gt;wtg007 wtg008 wtg009 wtg010 wtg011 wtg012&lt;/P&gt;&lt;P&gt;wkg001 wkg002 wkg003 wkg004 wkg005 wkg006&lt;/P&gt;&lt;P&gt;wkg007 wkg008 wkg009 wkg010 wkg011 wkg012&lt;/P&gt;&lt;P&gt;wog001 wog002 wog003 wog004 wog005 wog006&lt;/P&gt;&lt;P&gt;wog007 wog008 wog009 wog010 wog011 wog012&lt;/P&gt;&lt;P&gt;FROM coss APPENDING TABLE i_coss_t PACKAGE SIZE 2000&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FOR ALL ENTRIES IN p_i_vbakp&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;WHERE MANDT = sy-MANDT AND&lt;/P&gt;&lt;P&gt;lednr EQ c_lednr_0 AND gjahr EQ p_gjahr AND&lt;/P&gt;&lt;P&gt;wrttp EQ c_wrttp AND versn EQ c_versn_0 AND&lt;/P&gt;&lt;P&gt;kstar IN p_r_kstar_coss.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And also if possible avoid &lt;/P&gt;&lt;P&gt;SELECT--ENDSELECT.  Statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;&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;MADAN NAMDEO&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2009 05:26:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395096#M1405385</guid>
      <dc:creator>former_member188686</dc:creator>
      <dc:date>2009-12-02T05:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395097#M1405386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OLTP like systems: &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;proportion of hard parse time to execution time of SQL  high and with thousands of short transaction / sec: you will avoid hard parses of the statement due to the pinned statement in the sql cursor cache.&lt;/P&gt;&lt;P&gt;But I admit this would be mostly statements using bind variables  and NOT of ad hoc type, so maybe the gain is not that high...&lt;/P&gt;&lt;P&gt;More often not to use bind variables is the killer in such systems and not the order of the statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Data warehouse type: &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;proportion of hard parse time to execution time of SQL very low. Mostly (changing) literals and long running  queries (i.e SAP BW cube) : not much to gain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mostly not much to gain, but if you hit the right database type and the right access pattern it could be a benefit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the answer is : Yes, no, maybe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2009 08:02:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395097#M1405386</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-02T08:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395098#M1405387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK - interesting. I stand corrected. I thought there could be absolutely no performance improvement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think there may have been larger improvements in earlier releases and I think this may be why you often see this repeated.&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, 02 Dec 2009 14:07:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395098#M1405387</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-02T14:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395099#M1405388</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; OK - interesting. I stand corrected. I thought there could be absolutely no performance improvement.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; But I think there may have been larger improvements in earlier releases and I think this may be why you often see this repeated.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Rob&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob, just to avoid spreading the myth: putting the fields in the same order as in the table brings &lt;STRONG&gt;no&lt;/STRONG&gt; performance improvement. What &lt;EM&gt;can&lt;/EM&gt; bring some improvement is to make sure that the same select in different places is written the same way (so that the database can identify it is the same select). Writing the fields in the same order as in the table is just one convenient way to ensure that. Writing the fields in alphabetical order, for example, would be another way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2009 14:20:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395099#M1405388</guid>
      <dc:creator>Rui_Dantas</dc:creator>
      <dc:date>2009-12-02T14:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395100#M1405389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no performance gain, that is what I already said.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; But I admit this would be mostly statements using bind variables and NOT of ad hoc type, so maybe the gain is not that high...&lt;/P&gt;&lt;P&gt;&amp;gt; More often not to use bind variables is the killer in such systems and not the order of the statement.&lt;/P&gt;&lt;P&gt;Bind variables are by default used by the Open SQL database interface !!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2009 14:49:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395100#M1405389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-02T14:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395101#M1405390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes,yes - I left the SAP horizon because I did see other systems where this was not taken by heart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would be interesting how the Java environment could bring a SAP system down with not using binds!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what do you think?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 08:04:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395101#M1405390</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-03T08:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: DATABASE performance is very high</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395102#M1405391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;solved: There is no way to solve this issue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2009 11:15:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/database-performance-is-very-high/m-p/6395102#M1405391</guid>
      <dc:creator>vallamuthu_madheswaran2</dc:creator>
      <dc:date>2009-12-07T11:15:40Z</dc:date>
    </item>
  </channel>
</rss>

