<?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 for join 9 custom table with native SQL ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-for-join-9-custom-table-with-native-sql/m-p/7660776#M1573995</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Expert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need your opinion regarding performance to join 9 tables with native sql. Recently i have to tunning some customize extraction cost  report. This report extract about 10 million cost of material everyday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The current program actually, try to populate the condition data and insert into customize table and join all the table to get data using native sql.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT /*+ ordered use_hash(mst,pg,rg,ps,rs,dpg,drg,dps,drs) */
            mst.werks, ....................................

FROM
            sapsr3.zab_info mst,
            sapsr3.zab_pc pg,
            sapsr3.zab_rc rg,
            sapsr3.zab_pc ps,
            sapsr3.zab_rc rs,
            sapsr3.zab_g_pc dpg,
            sapsr3.zab_g_rc drg,
            sapsr3.zab_s_pc dps,
            sapsr3.zab_s_rc drs
        WHERE mst.zseq_no = :p_rep_run_id
        AND mst.werks = :p_werks
        AND mst.mandt = rg.mandt(+)
        AND mst.ekorg = rg.ekorg(+)
        AND mst.lifnr = rg.lifnr(+)
        AND mst.matnr = rg.matnr(+)
        ................................................
        ...............................................   unitl all table (9 tables)
        AND ps.mandt = dps.mandt(+)
        AND ps.knumh = dps.knumh(+)
        AND ps.zseq_no = dps.zseq_no(+)
        AND COALESCE (dps.kbetr, drs.kbetr, dpg.kbetr, drg.kbetr) &amp;lt;&amp;gt; 0
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems the query ask for database to using hashed table. would that be it will burden the database ? and impacted to others sap process ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You and Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Mar 2011 08:21:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-03-08T08:21:33Z</dc:date>
    <item>
      <title>Performance for join 9 custom table with native SQL ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-for-join-9-custom-table-with-native-sql/m-p/7660776#M1573995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Expert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need your opinion regarding performance to join 9 tables with native sql. Recently i have to tunning some customize extraction cost  report. This report extract about 10 million cost of material everyday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The current program actually, try to populate the condition data and insert into customize table and join all the table to get data using native sql.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT /*+ ordered use_hash(mst,pg,rg,ps,rs,dpg,drg,dps,drs) */
            mst.werks, ....................................

FROM
            sapsr3.zab_info mst,
            sapsr3.zab_pc pg,
            sapsr3.zab_rc rg,
            sapsr3.zab_pc ps,
            sapsr3.zab_rc rs,
            sapsr3.zab_g_pc dpg,
            sapsr3.zab_g_rc drg,
            sapsr3.zab_s_pc dps,
            sapsr3.zab_s_rc drs
        WHERE mst.zseq_no = :p_rep_run_id
        AND mst.werks = :p_werks
        AND mst.mandt = rg.mandt(+)
        AND mst.ekorg = rg.ekorg(+)
        AND mst.lifnr = rg.lifnr(+)
        AND mst.matnr = rg.matnr(+)
        ................................................
        ...............................................   unitl all table (9 tables)
        AND ps.mandt = dps.mandt(+)
        AND ps.knumh = dps.knumh(+)
        AND ps.zseq_no = dps.zseq_no(+)
        AND COALESCE (dps.kbetr, drs.kbetr, dpg.kbetr, drg.kbetr) &amp;lt;&amp;gt; 0
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems the query ask for database to using hashed table. would that be it will burden the database ? and impacted to others sap process ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You and Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 08:21:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-for-join-9-custom-table-with-native-sql/m-p/7660776#M1573995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-08T08:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Performance for join 9 custom table with native SQL ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-for-join-9-custom-table-with-native-sql/m-p/7660777#M1573996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can only argue coming from measurements and that is not the case.&lt;/P&gt;&lt;P&gt;Coming from the code, I see only that you do not understand it at all, so better leave it as it is. It is not a hash table, but a hash join on these table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 08:36:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-for-join-9-custom-table-with-native-sql/m-p/7660777#M1573996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-08T08:36:01Z</dc:date>
    </item>
  </channel>
</rss>

