<?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: Inner join performance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-performance/m-p/3771455#M907480</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;u can avoid 'appending corresponding fields'. instead populate into another internal table and then use loop+read to populate in to it_konten table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think u can go ahead with the inner join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhumitha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 May 2008 07:30:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-08T07:30:11Z</dc:date>
    <item>
      <title>Inner join performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-performance/m-p/3771453#M907478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could the following program be improved?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;types:
  begin of ty_konten,
    bukrs type bukrs,
    saknr type saknr,
  end of ty_konten.
data: it_konten type table of ty_konten.
data: wa_konten type ty_konten.

 
  select skb1~bukrs skb1~saknr
    appending corresponding fields of table it_konten
    from ska1 inner join skb1
      on ska1~saknr = skb1~saknr
    where ska1~ktopl = 'BSV'
      and ska1~xloev = ' '
      and skb1~xloeb = ' '.
  sort it_konten.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tommaso&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 07:09:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-performance/m-p/3771453#M907478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T07:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-performance/m-p/3771454#M907479</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;do this way ..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  select saknr
    into table it_ska1
    from ska1 
    where ktopl = 'BSV'
      and  xloev = ' '.
 if sy-subrc = 0.
  sort it_ska1.
endif.

 if not it_ska1[] is initial.  
  select bukrs saknr
    into table it_skb1
    from skb1 
    for all entires in it_ska1
    where saknr = it_ska1-saknr
      and  xloeb = ' '.
  if sy-subrc = 0.
   sort it_skb1 by saknr.
  endif.
endif.

loop at it_ska1.
  read table it_skb1 with key saknr = it_ska1-saknr.
  if sy-subrc = 0.
    it_konten-bukrs = it_skb1-bukrs.
    it_konten-saknr = it_skb1-saknr.
    append it_konten.
    clear    it_konten.
  endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 07:21:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-performance/m-p/3771454#M907479</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T07:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-performance/m-p/3771455#M907480</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;u can avoid 'appending corresponding fields'. instead populate into another internal table and then use loop+read to populate in to it_konten table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think u can go ahead with the inner join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhumitha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 07:30:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-performance/m-p/3771455#M907480</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T07:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-performance/m-p/3771456#M907481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both for your hints.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After some performance tests the best solution is the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  select skb1~bukrs skb1~saknr
    into table it_konten
    from ska1 inner join skb1
      on ska1~saknr = skb1~saknr
    where ska1~ktopl = 'BSV'
      and ska1~xloev = ' '
      and skb1~xloeb = ' '.
  sort it_konten.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Difficult is to guess the influence of the DB-caching.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tommaso&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 09:54:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-performance/m-p/3771456#M907481</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T09:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-performance/m-p/3771457#M907482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is nothing surprising here. The statement is rather simple you start with a part of SKA1&lt;/P&gt;&lt;P&gt;primary key check xloev = '' and access SKB1 with the index 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This join must be faster than any FAE solution!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The into corresponding is unncessary. But it was not a serious overhead.&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, 08 May 2008 10:53:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-performance/m-p/3771457#M907482</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T10:53:05Z</dc:date>
    </item>
  </channel>
</rss>

