<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1013679#M79466</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, the most scenario for me to use 'For all entrie' is as following:&lt;/P&gt;&lt;P&gt;If several table combine in a join select, maybe it will be poor on performance. So we need to split the join select into several single select. Then after first select, we can prepare the result in a internal table, and use it in another select as 'For all entries in [itab]'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.G. as following:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;original:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;  into ....&lt;/P&gt;&lt;P&gt;  from mseg&lt;/P&gt;&lt;P&gt; inner join in mkpf .....&lt;/P&gt;&lt;P&gt; where mkpf&lt;SUB&gt;MBLNR = mseg&lt;/SUB&gt;MBLNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;it is slow, so we change it&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;select MBLNR&lt;/P&gt;&lt;P&gt;  into table itab&lt;/P&gt;&lt;P&gt;  from mkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;  into ....&lt;/P&gt;&lt;P&gt;  from mseg&lt;/P&gt;&lt;P&gt;   for all entries in itab&lt;/P&gt;&lt;P&gt; where MBLNR = itab~MBLNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another fact is that the where use 'For all entries in', if the itab is very big, the whole select statement will be compiled and explained to be many pieces of select statements, and sent to DB layer.&lt;/P&gt;&lt;P&gt;So if the 'For all entries in' itab is too large, the select will be slow too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will be helpful.&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Aug 2005 12:57:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-08-18T12:57:40Z</dc:date>
    <item>
      <title>Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1013675#M79462</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;          Can anyone tell me which is alternate option for  select query &amp;lt;b&amp;gt;For all entries in [itab]&amp;lt;/b&amp;gt; where ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dilip&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2005 12:36:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1013675#M79462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-18T12:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1013676#M79463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you can loop at the first internal table and do a select statement in the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

Loop at itab.

* Do Select here and whatever else you
* need to do with the data.

endloop.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2005 12:43:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1013676#M79463</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-08-18T12:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1013677#M79464</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;try :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select (single) a1 a2 .. from dbtab&lt;/P&gt;&lt;P&gt;     where key1 = itab-f1&lt;/P&gt;&lt;P&gt;       and key2 = itab-f2&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2005 12:43:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1013677#M79464</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2005-08-18T12:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1013678#M79465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dilip,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have a performance issue when using For all entries? Please keep in mind that you must check whether the internal table contains some entries. If it is not, then it will select all the records from the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT ITAB[] IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT....FROM DBTAB&lt;/P&gt;&lt;P&gt;          FOR ALL ENTRIES IN ITAB&lt;/P&gt;&lt;P&gt;          WHERE....&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2005 12:54:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1013678#M79465</guid>
      <dc:creator>Vinod_Chandran</dc:creator>
      <dc:date>2005-08-18T12:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1013679#M79466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, the most scenario for me to use 'For all entrie' is as following:&lt;/P&gt;&lt;P&gt;If several table combine in a join select, maybe it will be poor on performance. So we need to split the join select into several single select. Then after first select, we can prepare the result in a internal table, and use it in another select as 'For all entries in [itab]'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.G. as following:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;original:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;  into ....&lt;/P&gt;&lt;P&gt;  from mseg&lt;/P&gt;&lt;P&gt; inner join in mkpf .....&lt;/P&gt;&lt;P&gt; where mkpf&lt;SUB&gt;MBLNR = mseg&lt;/SUB&gt;MBLNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;it is slow, so we change it&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;select MBLNR&lt;/P&gt;&lt;P&gt;  into table itab&lt;/P&gt;&lt;P&gt;  from mkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;  into ....&lt;/P&gt;&lt;P&gt;  from mseg&lt;/P&gt;&lt;P&gt;   for all entries in itab&lt;/P&gt;&lt;P&gt; where MBLNR = itab~MBLNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another fact is that the where use 'For all entries in', if the itab is very big, the whole select statement will be compiled and explained to be many pieces of select statements, and sent to DB layer.&lt;/P&gt;&lt;P&gt;So if the 'For all entries in' itab is too large, the select will be slow too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will be helpful.&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2005 12:57:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1013679#M79466</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-18T12:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1013680#M79467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;     Follow the following steps before using FOR ALL ENTRIES -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Check internal table that it is not empty .&lt;/P&gt;&lt;P&gt;2) If it have entries then SORT the table .&lt;/P&gt;&lt;P&gt;3) Delete duplicate entries from the table .&lt;/P&gt;&lt;P&gt;4) Use any key field in WHERE clouse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it may help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;NK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Nandkishor Heda&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2005 13:10:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1013680#M79467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-18T13:10:20Z</dc:date>
    </item>
  </channel>
</rss>

