<?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 on select query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538998#M1072356</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Valter,&lt;/P&gt;&lt;P&gt;I think this case is impossible to solve theoretically (at least for me). 1 billion records is a lot, and I'm not familiar with those IS-U installations. It will come down to comparing the options (also the one you introduced) in a system that holds sufficient data.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Oct 2008 16:15:44 GMT</pubDate>
    <dc:creator>ThomasZloch</dc:creator>
    <dc:date>2008-10-06T16:15:44Z</dc:date>
    <item>
      <title>Performance issue on select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538988#M1072346</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 any explain how the system behaves for the below 2 scenarios and which is much better?&lt;/P&gt;&lt;P&gt;In table EABLG i have around 1 billion records (FYI)&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;    SELECT&lt;/P&gt;&lt;P&gt;          ablbelnr&lt;/P&gt;&lt;P&gt;          anlage&lt;/P&gt;&lt;P&gt;          ablesgr   &lt;/P&gt;&lt;P&gt;      FROM eablg&lt;/P&gt;&lt;P&gt;      INTO TABLE it_eablg&lt;/P&gt;&lt;P&gt;      FOR ALL ENTRIES IN it_eanl&lt;/P&gt;&lt;P&gt;      WHERE ( anlage = it_eanl-anlage&lt;/P&gt;&lt;P&gt;        AND  ablesgr = '01'            &lt;/P&gt;&lt;P&gt;        AND adatsoll GT  '20080706' )        " last 3 months&lt;/P&gt;&lt;P&gt;      OR    ( anlage = it_eanl-anlage&lt;/P&gt;&lt;P&gt;        AND  ablesgr = '06' &lt;/P&gt;&lt;P&gt;        AND adatsoll GT  '20080706' )       " last 3 months&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;SELECT &lt;/P&gt;&lt;P&gt;          ablbelnr&lt;/P&gt;&lt;P&gt;          anlage&lt;/P&gt;&lt;P&gt;          ablesgr   &lt;/P&gt;&lt;P&gt;    FROM eablg&lt;/P&gt;&lt;P&gt;    INTO TABLE it_eablg&lt;/P&gt;&lt;P&gt;    FOR ALL ENTRIES IN it_eanl&lt;/P&gt;&lt;P&gt;    WHERE  anlage = it_eanl-anlage&lt;/P&gt;&lt;P&gt;    AND  (  ablesgr = '01'            &lt;/P&gt;&lt;P&gt;       OR     ablesgr = '06')          &lt;/P&gt;&lt;P&gt;   AND adatsoll GT '20080706'    .  " last 3 months &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;with regards&lt;/P&gt;&lt;P&gt;sumanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 15:29:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538988#M1072346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-06T15:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538989#M1072347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try running both through ST05 and then see the EXPLAIN. If there is any difference, that should show you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 15:32:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538989#M1072347</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-06T15:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538990#M1072348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The second option looks better because the WHERE condition is more simpler, but as Rob said you should use ST05 to check the differences. However, I would use this one:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT ablbelnr anlage ablesgr 
  FROM eablg
  INTO TABLE it_eablg
   FOR ALL ENTRIES IN it_eanl
 WHERE anlage = it_eanl-anlage
   AND ablesgr IN ('01','06') 
   AND adatsoll GT '20080706' . " last 3 months 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Since you are using index AAG you should have no problems .. unless it_eanl is too big.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Valter Oliveira on Oct 6, 2008 4:40 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 15:36:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538990#M1072348</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-10-06T15:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538991#M1072349</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; Did you tried in SE30 or ST05 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Naveen.i&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 15:37:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538991#M1072349</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2008-10-06T15:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538992#M1072350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the problem here is i dont have data in my development system and need to run this program in quailty soon with out any testing.. and so even if i run the trace in development system is of no gud use.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 15:41:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538992#M1072350</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-06T15:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538993#M1072351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, so I think what you should do is to find out is how big will be it_eanl ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 15:42:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538993#M1072351</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-10-06T15:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538994#M1072352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here EABLG consists of 1 billion records and IT_EANL consists of around 0.7 million records.&lt;/P&gt;&lt;P&gt;here i am dealing wiht large amount of data and so i need to be much care ful on the select query.&lt;/P&gt;&lt;P&gt;please suggest the best one&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 15:46:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538994#M1072352</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-06T15:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538995#M1072353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know if you are using signs like = &amp;lt;&amp;gt; is better just use that, and if you are using GT, EQ is the same thing so, the better option is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ablbelnr anlage ablesgr &lt;/P&gt;&lt;P&gt;  FROM eablg&lt;/P&gt;&lt;P&gt;  INTO TABLE it_eablg&lt;/P&gt;&lt;P&gt;   FOR ALL ENTRIES IN it_eanl&lt;/P&gt;&lt;P&gt; WHERE anlage EQ it_eanl-anlage&lt;/P&gt;&lt;P&gt;   AND ablesgr IN ('01','06') &lt;/P&gt;&lt;P&gt;   AND adatsoll GT '20080706' . " last 3 months&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is better for the interpreter SQL.&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;Ar@cely&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 15:52:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538995#M1072353</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-06T15:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538996#M1072354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; the problem here is i dont have data in my development system and need to run this program in quailty soon with out any testing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can enter SQL statements directly in ST05 (by hitting F5) in QA, so you don't have to transport the program beforehand.&lt;/P&gt;&lt;P&gt;Plus, convince your management that good data and unit testing is required in DEV if they want good quality programs.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 15:54:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538996#M1072354</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-10-06T15:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538997#M1072355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I wouldn't advise you to use FOR ALL ENTRIES from an internal table with 0.7 million records. As an alternative way, I would JOIN eanl and eablg, using package size to get data in blocks, because you may have memory problems too ... However, it's difficult to say that it's the BEST solution for your.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT a~anlage b~ablesgr b~ablbelnr
  INTO TABLE it_eablg
  FROM eanl AS a INNER JOIN eablg AS b
    ON a~anlage = b~anlage
  PACKAGE SIZE 100000
 WHERE a~anlage EQ "the condition you used to fill it_eanl
   AND b~ablesgr IN ('01','06')
   AND b~adatsoll GT '20080706' . " last 3 months
ENDSELECT. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I would ask rob or thomas to comment what I wrote ... &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 16:01:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538997#M1072355</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-10-06T16:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538998#M1072356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Valter,&lt;/P&gt;&lt;P&gt;I think this case is impossible to solve theoretically (at least for me). 1 billion records is a lot, and I'm not familiar with those IS-U installations. It will come down to comparing the options (also the one you introduced) in a system that holds sufficient data.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 16:15:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538998#M1072356</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-10-06T16:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538999#M1072357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for all the help specially Rob, Valter, Ar@cely and Thomas..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am going this way...coz as per the below analysis ..&lt;/P&gt;&lt;P&gt;EABLG table with the (where clause) conditions have 0.4 million records and so..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I will just fetch the records from EABLG &lt;/P&gt;&lt;P&gt;2) and then loop on EABLG and delete un necessary records from eablg...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas,&lt;/P&gt;&lt;P&gt;Can u tell how to write select queries in ST05 after pressing F5....&lt;/P&gt;&lt;P&gt;i tried copy paste the same select query with out for all entries and it throwed me some error or please share me some document if u have any &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sumanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 16:28:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4538999#M1072357</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-06T16:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4539000#M1072358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The statement has to be in a special format, so it might make sense run a trace in DEV, check the "Explain" there and download/upload the statement to QA (also via ST05). I have not tried this myself yet, so I would be interested if it works &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is two resources for you, SAP online help and a good blog by Siegfried Boes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp60_sp/helpdata/EN/d1/801f7c454211d189710000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp60_sp/helpdata/EN/d1/801f7c454211d189710000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_blogpost" href="https://community.sap.com/" __jive_macro_name="blogpost" modifiedtitle="true" __default_attr="44587"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a very powerful analysis tool, so it's worth the time to work yourself into it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But again, you actually want good test data in DEV for this matter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2008 17:10:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4539000#M1072358</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-10-06T17:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4539001#M1072359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thomas,&lt;/P&gt;&lt;P&gt;First of all, thanks for your answer &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; ... and I agree with you ... it's very difficult to solve it theoreticaly (that's why I said (to Sumanth) that I could not say that my idea was the best option). I was asking for your comment in the way that I think, since we have a complete index access for second table (eablg), doesn't matter if it has 1 billion records .. the amount of records of the first table (eanl) is the most important thing here, and FOR ALL ENTRIES would not be a good option if first table is very big (that's why I sugested the join) ... am I wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sumanth, &lt;/P&gt;&lt;P&gt;after testing in ST05 the various options, post here the result for us ... &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2008 11:01:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4539001#M1072359</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-10-07T11:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4539002#M1072360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DISCARD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Jan 2009 12:12:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-select-query/m-p/4539002#M1072360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-11T12:12:43Z</dc:date>
    </item>
  </channel>
</rss>

