<?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 improvement in select query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvement-in-select-query/m-p/7016449#M1497447</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;I have to improve the performance of the one custome program. I applied SQL trace &amp;amp; found out that below extract of code is taking maximum time&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;SELECT a~znumdos &lt;/P&gt;&lt;P&gt;           a~zdatctx &lt;/P&gt;&lt;P&gt;           a~zmotctx&lt;/P&gt;&lt;P&gt;           a~gpart                                  &lt;/P&gt;&lt;P&gt;           b~vkont&lt;/P&gt;&lt;P&gt;           d~zidbarcly                                      &lt;/P&gt;&lt;P&gt;           d&lt;SUB&gt;zligne d&lt;/SUB&gt;zstatulig                             &lt;/P&gt;&lt;P&gt;           b~zmontdact                                      &lt;/P&gt;&lt;P&gt;           c~zrmot_statut                                  &lt;/P&gt;&lt;P&gt;           d~zcanal                                        &lt;/P&gt;&lt;P&gt;           g~crdat                                         &lt;/P&gt;&lt;P&gt;           p~schedpid&lt;/P&gt;&lt;P&gt;           f~ktokl                                         &lt;/P&gt;&lt;P&gt;      FROM zr025sar AS a&lt;/P&gt;&lt;P&gt;      INNER JOIN zr026sar AS b       ON b&lt;SUB&gt;znumdos = a&lt;/SUB&gt;znumdos&lt;/P&gt;&lt;P&gt;      INNER JOIN zr027sar AS c       ON c&lt;SUB&gt;znumdos = a&lt;/SUB&gt;znumdos&lt;/P&gt;&lt;P&gt;                                     AND c&lt;SUB&gt;vkont   = b&lt;/SUB&gt;vkont&lt;/P&gt;&lt;P&gt;      INNER JOIN zr021sat AS d       ON c&lt;SUB&gt;zcanal = d&lt;/SUB&gt;zcanal &lt;/P&gt;&lt;P&gt;                                     AND c&lt;SUB&gt;zcontrat = d&lt;/SUB&gt;zcontrat&lt;/P&gt;&lt;P&gt;                                     AND c&lt;SUB&gt;zligne = d&lt;/SUB&gt;zligne&lt;/P&gt;&lt;P&gt;      INNER JOIN but000  AS g        ON a&lt;SUB&gt;gpart   = g&lt;/SUB&gt;partner&lt;/P&gt;&lt;P&gt;      INNER JOIN fkkvkp  AS f        ON f&lt;SUB&gt;vkont   = b&lt;/SUB&gt;vkont&lt;/P&gt;&lt;P&gt;                                    AND f&lt;SUB&gt;gpart   = g&lt;/SUB&gt;partner&lt;/P&gt;&lt;P&gt;      LEFT OUTER JOIN zr136sar AS p  ON p&lt;SUB&gt;znumdos = a&lt;/SUB&gt;znumdos&lt;/P&gt;&lt;P&gt;      APPENDING TABLE t_ctr_data_2&lt;/P&gt;&lt;P&gt;    WHERE a~zcanal       IN r_canal                         &lt;/P&gt;&lt;P&gt;      AND a~zdatctx      NE c_null_date &lt;/P&gt;&lt;P&gt;      AND a~zdatctx       &amp;lt; l_date_act               &lt;/P&gt;&lt;P&gt;      AND a~zmotctx      IN r_motife               &lt;/P&gt;&lt;P&gt;      AND a~zetadoss     IN r_dossier               &lt;/P&gt;&lt;P&gt;      AND b~zdateevent    &amp;lt; l_date_his                 &lt;/P&gt;&lt;P&gt;      AND d~zstatulig    IN r_ligne                            &lt;/P&gt;&lt;P&gt;      AND d~zdatstatulig NE c_null_date                          &lt;/P&gt;&lt;P&gt;      AND d~zdatstatulig LE l_date_mdf                    &lt;/P&gt;&lt;P&gt;      AND d~zplantarif   IN r_zptarif&lt;/P&gt;&lt;P&gt;      AND d~zstatugcr    IN r_statutgcr&lt;/P&gt;&lt;P&gt;      AND f~ktokl        IN r_categ.                        &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i use the for all entries in above code.. Will it enhance the performance of the code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jun 2010 09:42:24 GMT</pubDate>
    <dc:creator>mahesh_jagnani</dc:creator>
    <dc:date>2010-06-18T09:42:24Z</dc:date>
    <item>
      <title>Performance improvement in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvement-in-select-query/m-p/7016449#M1497447</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;I have to improve the performance of the one custome program. I applied SQL trace &amp;amp; found out that below extract of code is taking maximum time&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;SELECT a~znumdos &lt;/P&gt;&lt;P&gt;           a~zdatctx &lt;/P&gt;&lt;P&gt;           a~zmotctx&lt;/P&gt;&lt;P&gt;           a~gpart                                  &lt;/P&gt;&lt;P&gt;           b~vkont&lt;/P&gt;&lt;P&gt;           d~zidbarcly                                      &lt;/P&gt;&lt;P&gt;           d&lt;SUB&gt;zligne d&lt;/SUB&gt;zstatulig                             &lt;/P&gt;&lt;P&gt;           b~zmontdact                                      &lt;/P&gt;&lt;P&gt;           c~zrmot_statut                                  &lt;/P&gt;&lt;P&gt;           d~zcanal                                        &lt;/P&gt;&lt;P&gt;           g~crdat                                         &lt;/P&gt;&lt;P&gt;           p~schedpid&lt;/P&gt;&lt;P&gt;           f~ktokl                                         &lt;/P&gt;&lt;P&gt;      FROM zr025sar AS a&lt;/P&gt;&lt;P&gt;      INNER JOIN zr026sar AS b       ON b&lt;SUB&gt;znumdos = a&lt;/SUB&gt;znumdos&lt;/P&gt;&lt;P&gt;      INNER JOIN zr027sar AS c       ON c&lt;SUB&gt;znumdos = a&lt;/SUB&gt;znumdos&lt;/P&gt;&lt;P&gt;                                     AND c&lt;SUB&gt;vkont   = b&lt;/SUB&gt;vkont&lt;/P&gt;&lt;P&gt;      INNER JOIN zr021sat AS d       ON c&lt;SUB&gt;zcanal = d&lt;/SUB&gt;zcanal &lt;/P&gt;&lt;P&gt;                                     AND c&lt;SUB&gt;zcontrat = d&lt;/SUB&gt;zcontrat&lt;/P&gt;&lt;P&gt;                                     AND c&lt;SUB&gt;zligne = d&lt;/SUB&gt;zligne&lt;/P&gt;&lt;P&gt;      INNER JOIN but000  AS g        ON a&lt;SUB&gt;gpart   = g&lt;/SUB&gt;partner&lt;/P&gt;&lt;P&gt;      INNER JOIN fkkvkp  AS f        ON f&lt;SUB&gt;vkont   = b&lt;/SUB&gt;vkont&lt;/P&gt;&lt;P&gt;                                    AND f&lt;SUB&gt;gpart   = g&lt;/SUB&gt;partner&lt;/P&gt;&lt;P&gt;      LEFT OUTER JOIN zr136sar AS p  ON p&lt;SUB&gt;znumdos = a&lt;/SUB&gt;znumdos&lt;/P&gt;&lt;P&gt;      APPENDING TABLE t_ctr_data_2&lt;/P&gt;&lt;P&gt;    WHERE a~zcanal       IN r_canal                         &lt;/P&gt;&lt;P&gt;      AND a~zdatctx      NE c_null_date &lt;/P&gt;&lt;P&gt;      AND a~zdatctx       &amp;lt; l_date_act               &lt;/P&gt;&lt;P&gt;      AND a~zmotctx      IN r_motife               &lt;/P&gt;&lt;P&gt;      AND a~zetadoss     IN r_dossier               &lt;/P&gt;&lt;P&gt;      AND b~zdateevent    &amp;lt; l_date_his                 &lt;/P&gt;&lt;P&gt;      AND d~zstatulig    IN r_ligne                            &lt;/P&gt;&lt;P&gt;      AND d~zdatstatulig NE c_null_date                          &lt;/P&gt;&lt;P&gt;      AND d~zdatstatulig LE l_date_mdf                    &lt;/P&gt;&lt;P&gt;      AND d~zplantarif   IN r_zptarif&lt;/P&gt;&lt;P&gt;      AND d~zstatugcr    IN r_statutgcr&lt;/P&gt;&lt;P&gt;      AND f~ktokl        IN r_categ.                        &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i use the for all entries in above code.. Will it enhance the performance of the code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 09:42:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvement-in-select-query/m-p/7016449#M1497447</guid>
      <dc:creator>mahesh_jagnani</dc:creator>
      <dc:date>2010-06-18T09:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Performance improvement in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvement-in-select-query/m-p/7016450#M1497448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;  create a view with all the tables mentioned in the select with " INNER JOIN ", this should improve the performance. Also avoid using 'NE" in where clause. Don't use table  "zr136sar" in the view creation as it joined using 'LEFT OUTER JOIN". first fetch data from the view which you are going to create and then fetch data from "zr136sar" using FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Phani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 10:00:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvement-in-select-query/m-p/7016450#M1497448</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-18T10:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Performance improvement in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvement-in-select-query/m-p/7016451#M1497449</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;Why dont you use FOR ALL ENTRIES for 3 tables. Select the data from 3 tables into internal table and write the select quirey for next 3 tables with FOR ALL ENTRIES on first internal table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jun 2010 10:53:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvement-in-select-query/m-p/7016451#M1497449</guid>
      <dc:creator>venkatasriram_mygapula</dc:creator>
      <dc:date>2010-06-20T10:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Performance improvement in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvement-in-select-query/m-p/7016452#M1497450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;unfortunately nobody can help you here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your task depends on the actually used select-options (IN), on the actual distribution of the data and the available indexes on the z-tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would neither recommend you a view, which is just a dictionary stored join and also not a FOR ALL ENTRIES, which will not increase the performance but reduce duplicates at the end, whcih can change even the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must analyse the statement in detail and I would recommend you to get some support by somebody more experienced.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jun 2010 20:15:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvement-in-select-query/m-p/7016452#M1497450</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-20T20:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Performance improvement in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvement-in-select-query/m-p/7016453#M1497451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 08:16:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvement-in-select-query/m-p/7016453#M1497451</guid>
      <dc:creator>mahesh_jagnani</dc:creator>
      <dc:date>2011-04-11T08:16:46Z</dc:date>
    </item>
  </channel>
</rss>

