<?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: same select statement taking more time in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189291#M1374315</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its problem with index of second table and sorted ou after creating index for same&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Nov 2009 10:41:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-11-16T10:41:02Z</dc:date>
    <item>
      <title>same select statement taking more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189284#M1374308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two select statements. only the name of table from where it is fetching records are different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) select belnr posnr etenr into corresponding fields of table it_cdtemp2&lt;/P&gt;&lt;P&gt;from j_3avasso for all entries in it_cdtemp1&lt;/P&gt;&lt;P&gt;where belnr = it_cdtemp1-vbeln and posnr = it_cdtemp1-posnr .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_cdtemp1 has 100 entries and j_3avasso has 20000 entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) select belnr posnr etenr into corresponding fields of table it_cdtemp2&lt;/P&gt;&lt;P&gt;from j_3avap for all entries in it_cdtemp1&lt;/P&gt;&lt;P&gt;where belnr = it_cdtemp1-vbeln and posnr = it_cdtemp1-posnr .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_cdtemp1 has 100 entries and j_3avasso has 2000 entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;statement 1 is executing less than a minute where as statement 2 is taking around 15 to 20 minutes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could anyone suggest why.. if so how to minimize run time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2009 16:42:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189284#M1374308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-07T16:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: same select statement taking more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189285#M1374309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) Since you are using for all entries, check if the internal table is initial before the select query&lt;/P&gt;&lt;P&gt;2) Check if belnr and posnr which are in the where condition are primary keys fields of the table j_3avap. Try to include as many primary keys in the where condition&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2009 16:49:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189285#M1374309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-07T16:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: same select statement taking more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189286#M1374310</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;Try clear and refresh the table it_cdtemp2 before run the second Select or use APPENDING TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this information is help to 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;José&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2009 19:10:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189286#M1374310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-07T19:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: same select statement taking more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189287#M1374311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dependencies:&lt;/P&gt;&lt;P&gt;- Number of records in for all entries table&lt;/P&gt;&lt;P&gt;- total number of records in databse from where you are fetching&lt;/P&gt;&lt;P&gt;- does the where clause contains key fields?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2009 19:25:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189287#M1374311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-07T19:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: same select statement taking more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189288#M1374312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bala,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think members have suggested a lot of points which will solve your problem.&lt;/P&gt;&lt;P&gt;I would like to point out few things..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.AVOID using into corresponding fields...instead make a structure with the required fields for both the selects.&lt;/P&gt;&lt;P&gt;2.ALWAYS check whether the table being used for 'FOR ALL ENTRIES' is not initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps solve the pending issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 09:12:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189288#M1374312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-08T09:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: same select statement taking more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189289#M1374313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 09:23:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189289#M1374313</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-08T09:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: same select statement taking more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189290#M1374314</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;&lt;/P&gt;&lt;P&gt;You can sort the internal table before using FOR ALL ENTRIES BY VBELN and POSNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will save a lot of processing time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also try combing both the selects as one join statement taking both the tables with for all entries addition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Subhashini&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Subhashini K on Oct 8, 2009 2:58 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 09:23:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189290#M1374314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-08T09:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: same select statement taking more time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189291#M1374315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its problem with index of second table and sorted ou after creating index for same&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2009 10:41:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/same-select-statement-taking-more-time/m-p/6189291#M1374315</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-16T10:41:02Z</dc:date>
    </item>
  </channel>
</rss>

