<?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 performance issue in select query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-select-query/m-p/4931716#M1150472</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: do not post the same question in two forums.  Duplicate (together with answers) deleted.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT a~grant_nbr
        a~zzdonorfy
        a~company_code
        b~language
      b~short_desc
INTO TABLE i_gmgr_text
FROM gmgr AS a
INNER JOIN gmgrtexts AS b ON a~grant_nbr = b~grant_nbr
WHERE a~grant_nbr  IN s_grant
AND   a~zzdonorfy  IN s_dono
AND   b~language   EQ sy-langu
AND   b~short_desc IN s_cont.

How to use for all all entries in the above inner join for better performance?

then....

  IF sy-subrc EQ 0.
    SORT i_gmgr_text BY grant_nbr.
  ENDIF.

  IF i_gmgr_text[] IS NOT INITIAL.

* Actual Line Item Table
    SELECT rgrant_nbr
           gl_sirid
           rbukrs
           rsponsored_class
           refdocnr
           refdocln
    FROM gmia
    INTO TABLE i_gmia
    FOR ALL ENTRIES IN i_gmgr_text
    WHERE rgrant_nbr        = i_gmgr_text-grant_nbr
    AND   rbukrs            = i_gmgr_text-company_code
    AND   rsponsored_class IN s_spon.

    IF sy-subrc EQ 0.
      SORT i_gmia BY refdocnr refdocln.
    ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on Dec 17, 2008 1:40 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Dec 2008 10:29:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-17T10:29:31Z</dc:date>
    <item>
      <title>performance issue in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-select-query/m-p/4931716#M1150472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: do not post the same question in two forums.  Duplicate (together with answers) deleted.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT a~grant_nbr
        a~zzdonorfy
        a~company_code
        b~language
      b~short_desc
INTO TABLE i_gmgr_text
FROM gmgr AS a
INNER JOIN gmgrtexts AS b ON a~grant_nbr = b~grant_nbr
WHERE a~grant_nbr  IN s_grant
AND   a~zzdonorfy  IN s_dono
AND   b~language   EQ sy-langu
AND   b~short_desc IN s_cont.

How to use for all all entries in the above inner join for better performance?

then....

  IF sy-subrc EQ 0.
    SORT i_gmgr_text BY grant_nbr.
  ENDIF.

  IF i_gmgr_text[] IS NOT INITIAL.

* Actual Line Item Table
    SELECT rgrant_nbr
           gl_sirid
           rbukrs
           rsponsored_class
           refdocnr
           refdocln
    FROM gmia
    INTO TABLE i_gmia
    FOR ALL ENTRIES IN i_gmgr_text
    WHERE rgrant_nbr        = i_gmgr_text-grant_nbr
    AND   rbukrs            = i_gmgr_text-company_code
    AND   rsponsored_class IN s_spon.

    IF sy-subrc EQ 0.
      SORT i_gmia BY refdocnr refdocln.
    ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on Dec 17, 2008 1:40 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 10:29:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-select-query/m-p/4931716#M1150472</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T10:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-select-query/m-p/4931717#M1150473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Do not post the same question in two forums.  Do surround your abap with  tags.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now.  Why on earth do you think that "for all entries" is better performing that "inner joins".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;( and anyone who just posts an answer, rewriting the posters code with "for all entries", will have their reply rejected, unless they justify why their code is better ).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 12:42:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-select-query/m-p/4931717#M1150473</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-12-17T12:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-select-query/m-p/4931718#M1150474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; How to use for all all entries in the above inner join for better performance?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my best christmas recommendation for performance, simply ignore such recommendations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And check the performance of your join!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the performance really low, if it is then there is probably no index support. Without indexes FOR ALL ENTRIES will be much slower.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2008 09:33:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-select-query/m-p/4931718#M1150474</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-18T09:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-select-query/m-p/4931719#M1150475</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>Fri, 19 Dec 2008 07:39:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-select-query/m-p/4931719#M1150475</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-19T07:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-select-query/m-p/4931720#M1150476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As performance point of view innner join is not good. To improve performance you have to made two internal table.And make for all entries in the second internal table.like this&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>Fri, 19 Dec 2008 09:04:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-select-query/m-p/4931720#M1150476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-19T09:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-select-query/m-p/4931721#M1150477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; As performance point of view innner join is not good. To improve performance you have to made two&lt;/P&gt;&lt;P&gt;&amp;gt; internal table.And make for all entries in the second internal table.like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please stop writing nonsense recommendations! Did you ever test what you write ... I guess no.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2008 11:18:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-in-select-query/m-p/4931721#M1150477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-19T11:18:30Z</dc:date>
    </item>
  </channel>
</rss>

