<?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: Avoiding inner joins???? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248062#M775388</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sir i was able to find out that&lt;/P&gt;&lt;P&gt;Using several nested INNER JOIN statements can be inefficient and cause time out if the tables become too big in the future." &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joins here (in ABAP) are not those Native SQL Joins.  If you are talking about the Core RDBMS, which mean Oracle or SQL Server, then Undoubtedly Joins are the best. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ABAP, these joins are first split by the ABAP processor and then sent to the database, with the increase in DATA in production system, these joins tend to give way if your database keeps growing larger and larger. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should rather used "FOR ALL ENTRIES IN" (Tabular conditions), which is a much effecient way as far as performance is concerned. &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;DATA: BEGIN OF LINE, &lt;/P&gt;&lt;P&gt;        CARRID   TYPE SPFLI-CARRID, &lt;/P&gt;&lt;P&gt;        CONNID   TYPE SPFLI-CONNID, &lt;/P&gt;&lt;P&gt;        CITYFROM TYPE SPFLI-CITYFROM, &lt;/P&gt;&lt;P&gt;        CITYTO   TYPE SPFLI-CITYTO, &lt;/P&gt;&lt;P&gt;      END OF LINE, &lt;/P&gt;&lt;P&gt;      ITAB LIKE TABLE OF LINE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LINE-CITYFROM = 'FRANKFURT'. &lt;/P&gt;&lt;P&gt;LINE-CITYTO   = 'BERLIN'. &lt;/P&gt;&lt;P&gt;APPEND LINE TO ITAB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LINE-CITYFROM = 'NEW YORK'. &lt;/P&gt;&lt;P&gt;LINE-CITYTO   = 'SAN FRANCISCO'. &lt;/P&gt;&lt;P&gt;APPEND LINE TO ITAB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT CARRID CONNID CITYFROM CITYTO &lt;/P&gt;&lt;P&gt;INTO   CORRESPONDING FIELDS OF LINE &lt;/P&gt;&lt;P&gt;FROM   SPFLI &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN ITAB &lt;/P&gt;&lt;P&gt;WHERE  CITYFROM = ITAB-CITYFROM AND CITYTO = ITAB-CITYTO. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE: / LINE-CARRID, LINE-CONNID, LINE-CITYFROM, LINE-CITYTO. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have a ABAP Question? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards, &lt;/P&gt;&lt;P&gt;SAP Basis, ABAP Programming and Other IMG Stuff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jan 2008 11:38:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-09T11:38:17Z</dc:date>
    <item>
      <title>Avoiding inner joins????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248060#M775386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was just thinking of ways to improve the perfomance of my report. Its fetching data in to two different tables using two innerjoins and these two internal tables are again looped for some other manipulation. Can anyone tell me the ways i can avoid innerjoin or is there other ways to improve psrfomance by avoiding innejoins in general?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rakesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 09:42:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248060#M775386</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T09:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding inner joins????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248061#M775387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rakesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use FOR ALL ENTRIES to avoid the Inner Join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paste your Inner Join Select Statement here, i will direct you how to use FOR ALL ENTRIES instead of joins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 09:45:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248061#M775387</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T09:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding inner joins????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248062#M775388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sir i was able to find out that&lt;/P&gt;&lt;P&gt;Using several nested INNER JOIN statements can be inefficient and cause time out if the tables become too big in the future." &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joins here (in ABAP) are not those Native SQL Joins.  If you are talking about the Core RDBMS, which mean Oracle or SQL Server, then Undoubtedly Joins are the best. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ABAP, these joins are first split by the ABAP processor and then sent to the database, with the increase in DATA in production system, these joins tend to give way if your database keeps growing larger and larger. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should rather used "FOR ALL ENTRIES IN" (Tabular conditions), which is a much effecient way as far as performance is concerned. &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;DATA: BEGIN OF LINE, &lt;/P&gt;&lt;P&gt;        CARRID   TYPE SPFLI-CARRID, &lt;/P&gt;&lt;P&gt;        CONNID   TYPE SPFLI-CONNID, &lt;/P&gt;&lt;P&gt;        CITYFROM TYPE SPFLI-CITYFROM, &lt;/P&gt;&lt;P&gt;        CITYTO   TYPE SPFLI-CITYTO, &lt;/P&gt;&lt;P&gt;      END OF LINE, &lt;/P&gt;&lt;P&gt;      ITAB LIKE TABLE OF LINE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LINE-CITYFROM = 'FRANKFURT'. &lt;/P&gt;&lt;P&gt;LINE-CITYTO   = 'BERLIN'. &lt;/P&gt;&lt;P&gt;APPEND LINE TO ITAB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LINE-CITYFROM = 'NEW YORK'. &lt;/P&gt;&lt;P&gt;LINE-CITYTO   = 'SAN FRANCISCO'. &lt;/P&gt;&lt;P&gt;APPEND LINE TO ITAB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT CARRID CONNID CITYFROM CITYTO &lt;/P&gt;&lt;P&gt;INTO   CORRESPONDING FIELDS OF LINE &lt;/P&gt;&lt;P&gt;FROM   SPFLI &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN ITAB &lt;/P&gt;&lt;P&gt;WHERE  CITYFROM = ITAB-CITYFROM AND CITYTO = ITAB-CITYTO. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE: / LINE-CARRID, LINE-CONNID, LINE-CITYFROM, LINE-CITYTO. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have a ABAP Question? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards, &lt;/P&gt;&lt;P&gt;SAP Basis, ABAP Programming and Other IMG Stuff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 11:38:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248062#M775388</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T11:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding inner joins????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248063#M775389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[JOINS vs. FOR ALL ENTRIES - Which Performs Better?|/people/rob.burbank/blog/2007/03/19/joins-vs-for-all-entries--which-performs-better]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 14:20:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248063#M775389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T14:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding inner joins????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248064#M775390</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;There are two types of JOINS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOINS and OUTERJOINS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the case of INNER JOIN only the records from tables for which the JOIN condition is met are retrieved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the case of OUTER JOIN you will get all the fields that are there in the LEFT table irrespective of the join condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the thread&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="461566"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;adesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Sep 2009 17:23:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248064#M775390</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-20T17:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding inner joins????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248065#M775391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am reading and writing in the forum for over 2 years now, and these 'Avoid inner joins' recommendations come again and again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally speaking, the JOIN is &lt;STRONG&gt;BETTER&lt;/STRONG&gt; than any FOR ALL ENTRIES solution. The join does the same as the FOR ALL ENTRIES directly in the database wothout the blockwise transfer of the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes things go wrong with the join, then the problems can become more serve as with the FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;This depends however 100% on the actually setting of SELECT, indexes, database optimizer and table content. And there &lt;/P&gt;&lt;P&gt;is not much to generalize. You can only analyse it in your setting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, you should not look for the better of the bad solutions, but for the best solution and this should be the optimally working join. Therefore the WHERE-condition must be optimal and the indexes must support the accesses. Unfortunately the whole story needs more than just a few lines of explanation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2009 09:28:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248065#M775391</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-21T09:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding inner joins????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248066#M775392</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;With all the inputs from experts,I think you should change your code from Inner Joins to For All Entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A example for the same would be as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT fields&lt;/P&gt;&lt;P&gt;    FROM EKKO&lt;/P&gt;&lt;P&gt;    INTO TABLE IT_EKKO&lt;/P&gt;&lt;P&gt;    WHERE LIFNR IN SO_LIFNR&lt;/P&gt;&lt;P&gt;    AND   AEDAT IN SO_DATE&lt;/P&gt;&lt;P&gt;    AND   BSTYP EQ 'F'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF IT_EKKO[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;*filter data from EKPO table,condition check on Purchasing document number,material &amp;amp; plant&lt;/P&gt;&lt;P&gt;    SELECT fields&lt;/P&gt;&lt;P&gt;      FROM EKPO&lt;/P&gt;&lt;P&gt;      INTO TABLE IT_EKPO&lt;/P&gt;&lt;P&gt;      FOR ALL ENTRIES IN IT_EKKO&lt;/P&gt;&lt;P&gt;      WHERE EBELN EQ IT_EKKO-EBELN&lt;/P&gt;&lt;P&gt;      AND   MATNR IN SO_MATNR&lt;/P&gt;&lt;P&gt;      AND   WERKS IN SO_WERKS.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;      MESSAGE S000(DB) WITH TEXT-002.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you are able to get a solution to your query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2009 07:05:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248066#M775392</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-29T07:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding inner joins????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248067#M775393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rakesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The essence of the discussion, conducted dozens of times on this forum, will be clear from the other replies: an inner join, if corectly designed, will give better performance than FOR ALL ENTRIES. The join really means that you ask the database to do the "for all entries" for you, without the application overhead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I write a join - except a really simple one - I always &lt;EM&gt;prototype&lt;/EM&gt; it first using FOR ALL ENTRIES, because this makes it much easier to locate bad join conditions with SQL Trace. An SQL Trace on the join is normally not helpful because you don't get statistics at the level of the individual tables. So my advice is: design your logic with FOR ALL ENTRIES, trace and tune this, and then rewrite the lot to an inner join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 12:15:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248067#M775393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T12:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding inner joins????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248068#M775394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; With all the inputs from experts,I think you should change your code from Inner Joins to For All Entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can you explain your reasoning??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 12:59:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248068#M775394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T12:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding inner joins????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248069#M775395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; An SQL Trace on the join is normally not helpful because you don't get statistics at the level of the individual tables. &lt;/P&gt;&lt;P&gt;is this really necessary?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you need to know is the order of processing of the tables &lt;/P&gt;&lt;P&gt;and the index used for each table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can be found in every Join explain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before you must analyse the optimal order of processing and the index which should be used.&lt;/P&gt;&lt;P&gt;Therefore the SE16 can be helpful, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT ....
              FROM A
              INNER JOIN B
              ON  A~f1 = B~f1
              WHERE  A~f2 = '123'
              AND      B~f3 = 'abc'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;order   A then B, there should be an index on A starting with f2 and an index on B with f1 and f3&lt;/P&gt;&lt;P&gt;order   B then A, there should be an index on B starting with f3 and an index on A with f1 and f2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check with SE16, which table is better suited to start with&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT ....
              FROM A
              WHERE  A~f2 = '123'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT ....
              FROM  B
              WHERE    B~f3 = 'abc'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; your expectation, this can be checked in SQL-Trace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 13:17:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248069#M775395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T13:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding inner joins????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248070#M775396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &amp;gt; An SQL Trace on the join is normally not helpful because you don't get statistics at the level of the individual tables. &lt;/P&gt;&lt;P&gt;&amp;gt; is this really necessary?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess there are various ways to go about this, prototyping using 'for all entries' and then sql-tracing the prototype has always done the job quite well for me. Anyway, a 2-table join probably doesn't need this approach, it is usually easy enough to figure out the best access by looking at the available indexes. A join over a large number of tables is a different matter though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 13:27:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248070#M775396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T13:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding inner joins????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248071#M775397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; A join over a large number of tables is a different matter though.&lt;/P&gt;&lt;P&gt;but that is actually the problem, how do you determine the order of the FOR ALL ENTRIES?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must know the order of the processing before you start the FOR ALL ENTRIES, so you can&lt;/P&gt;&lt;P&gt;try the join, if it uses the oorder and is fast then you done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Analysis can be hard, your approach can help there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is simple argument for the Join, assume there are two select-options on table A and table B. &lt;/P&gt;&lt;P&gt;Both can be empty. If the condition on B is empty, the join can start with A. If the condition on A is empty,&lt;/P&gt;&lt;P&gt;the join can start with B. A FOR ALL ENTRIES is not that flexible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 15:01:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-inner-joins/m-p/3248071#M775397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-30T15:01:08Z</dc:date>
    </item>
  </channel>
</rss>

