<?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: Data retrieval from 8 db tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040290#M719519</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The performance differences between FOR ALL ENTRIES and JOINs is not that great; the important thing is the effective use of indexes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Nov 2007 13:15:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-01T13:15:11Z</dc:date>
    <item>
      <title>Data retrieval from 8 db tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040286#M719515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We haev a requirement where we need to query 7 tables to retrieve some data and display it in the form of a list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This report is to be executed in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now we have 3 select statements, each of which has inner joins on 2-3 tables and uses "for all entries". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Performance wise which would be a better option - to keep it this way, or have separate select statement for each table and then read statements on internal tabels for output? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Munish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2007 07:54:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040286#M719515</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-01T07:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Data retrieval from 8 db tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040287#M719516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Munish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This depend on the table in consideration and the number of entries, Selction screen fields which can be used in WHERE clause, etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I think you can take a decision on these parameters as well you can do the sql trace using ST05 and find out which is better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2007 07:57:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040287#M719516</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-01T07:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Data retrieval from 8 db tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040288#M719517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think it depends on the balance between ABAP time and Database time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you select all the data from tables independently and then do looping etc,&lt;/P&gt;&lt;P&gt;it will increase the hits as well as the ABAP time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the next best option is a mix of both. I believe the current approach holds good.&lt;/P&gt;&lt;P&gt;As, has been mentioned before also in this thread, you can improve the performance if the joins are being made on key fields since this reduced overhead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I were using tables which had all been joined with key fields I would have gone as high as with 5 Joins but I guess this is an ideal scenario so a join of 2-3 tables is a decent approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the subsequent handling in ABAP is the only next step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this approach is fine and you should incorporate correct performance guidelines which you can find in this forum if you search for them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2007 08:17:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040288#M719517</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-01T08:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Data retrieval from 8 db tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040289#M719518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the replies guys!! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the last 2 hours I have been going through the posts looking for the clues.. and i guess its gonna take a bit more than simply choosing between inner join or for all entries &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2007 09:21:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040289#M719518</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-01T09:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Data retrieval from 8 db tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040290#M719519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The performance differences between FOR ALL ENTRIES and JOINs is not that great; the important thing is the effective use of indexes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2007 13:15:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040290#M719519</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-01T13:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Data retrieval from 8 db tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040291#M719520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a view joining (inner joins) as many tables as possible. You can also specify the selection conditions in your view. This will improve the performance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2007 14:04:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040291#M719520</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-01T14:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Data retrieval from 8 db tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040292#M719521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rob! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Infact yesterday I went through your and Siegfried's posts and articles only. Its only then that I realized that there s no step-by-step procedure for this. Really enjoyed reading your insightful posts. Thanks again &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 14:25:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040292#M719521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T14:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Data retrieval from 8 db tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040293#M719522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sam!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 15:15:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-retrieval-from-8-db-tables/m-p/3040293#M719522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T15:15:28Z</dc:date>
    </item>
  </channel>
</rss>

