<?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 SQL trace of a select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace-of-a-select-statement/m-p/4942476#M1152761</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;SELECT bukrs vkorg  kunag kunnr matnr zzdatin zzstock&lt;/P&gt;&lt;P&gt;    INTO TABLE t_zrs06_zzstock&lt;/P&gt;&lt;P&gt;    FROM zrs06&lt;/P&gt;&lt;P&gt;    FOR ALL ENTRIES IN t_zrs06&lt;/P&gt;&lt;P&gt;    WHERE bukrs = t_zrs06-bukrs&lt;/P&gt;&lt;P&gt;      AND vkorg = t_zrs06-vkorg&lt;/P&gt;&lt;P&gt;      AND kunag = t_zrs06-kunag&lt;/P&gt;&lt;P&gt;      AND kunnr = t_zrs06-kunnr&lt;/P&gt;&lt;P&gt;      AND matnr = t_zrs06-matnr&lt;/P&gt;&lt;P&gt;      AND zzdatin LE t_zrs06-zzdatin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above select statement is causing a performance issue.I have run the sql trace for this statement.The driver internal table t_zrs06 is having 8 entries.But when I clicked on REOPEN statement of this sl query in ST05 transaction it is showing only 5 entries for matnr field.What would be the reason?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Dec 2008 09:36:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-10T09:36:47Z</dc:date>
    <item>
      <title>SQL trace of a select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace-of-a-select-statement/m-p/4942476#M1152761</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;SELECT bukrs vkorg  kunag kunnr matnr zzdatin zzstock&lt;/P&gt;&lt;P&gt;    INTO TABLE t_zrs06_zzstock&lt;/P&gt;&lt;P&gt;    FROM zrs06&lt;/P&gt;&lt;P&gt;    FOR ALL ENTRIES IN t_zrs06&lt;/P&gt;&lt;P&gt;    WHERE bukrs = t_zrs06-bukrs&lt;/P&gt;&lt;P&gt;      AND vkorg = t_zrs06-vkorg&lt;/P&gt;&lt;P&gt;      AND kunag = t_zrs06-kunag&lt;/P&gt;&lt;P&gt;      AND kunnr = t_zrs06-kunnr&lt;/P&gt;&lt;P&gt;      AND matnr = t_zrs06-matnr&lt;/P&gt;&lt;P&gt;      AND zzdatin LE t_zrs06-zzdatin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above select statement is causing a performance issue.I have run the sql trace for this statement.The driver internal table t_zrs06 is having 8 entries.But when I clicked on REOPEN statement of this sl query in ST05 transaction it is showing only 5 entries for matnr field.What would be the reason?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2008 09:36:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace-of-a-select-statement/m-p/4942476#M1152761</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-10T09:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: SQL trace of a select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace-of-a-select-statement/m-p/4942477#M1152762</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;the reason is the blocking of FAE (FOR ALL ENTRIES statements). See parameters &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rsdb/max_blocking_factor&lt;/P&gt;&lt;P&gt;rsdb/max_in_blocking_factor (for FAE with only 1 'join field' can result in IN lists)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and documentation in RZ11. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should find another statement with the remaining 3 values in the same trace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2008 09:51:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace-of-a-select-statement/m-p/4942477#M1152762</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2008-12-10T09:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: SQL trace of a select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace-of-a-select-statement/m-p/4942478#M1152763</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 guess you should reduce fields in where clause without affecting the result because you are cheking many fields in where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rather than if you take all the data from zrs06 into t_zrs06_zzstock and after that &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_zrs06 into workarea&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read  t_zrs06_zzstock  into workarea1 with key &lt;/P&gt;&lt;P&gt; vkorg = t_zrs06-vkorg&lt;/P&gt;&lt;P&gt; kunag = t_zrs06-kunag&lt;/P&gt;&lt;P&gt; kunnr = t_zrs06-kunnr&lt;/P&gt;&lt;P&gt; matnr = t_zrs06-matnr&lt;/P&gt;&lt;P&gt; zzdatin LE t_zrs06-zzdatin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will reduce (permitation combination while extracting data from database) and result is database hit&lt;/P&gt;&lt;P&gt;will reduce.&lt;/P&gt;&lt;P&gt;ABAP performanace will increase but it will okay....Database is very importanat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2008 12:08:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace-of-a-select-statement/m-p/4942478#M1152763</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-10T12:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: SQL trace of a select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace-of-a-select-statement/m-p/4942479#M1152764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; But when I clicked on REOPEN statement of this sl query in ST05 transaction it is showing only 5&lt;/P&gt;&lt;P&gt; &amp;gt; entries for matnr field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after the FETCH or FETCHES tthere should be another REOPEN with 3 entries ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can not see the performance problem, how many records come back and how long does it take?&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, 10 Dec 2008 16:53:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace-of-a-select-statement/m-p/4942479#M1152764</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-10T16:53:41Z</dc:date>
    </item>
  </channel>
</rss>

