<?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: performance issue with AUSP table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503792#M2003427</link>
    <description>&lt;P&gt;Please edit your question, select your code and press the button [CODE], which makes the code appear colored/indented, it will be easier for people to look at it. Thank you! &lt;/P&gt;</description>
    <pubDate>Mon, 24 Jan 2022 19:29:56 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2022-01-24T19:29:56Z</dc:date>
    <item>
      <title>performance issue with AUSP table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503785#M2003420</link>
      <description>&lt;P&gt;Hi experts&lt;/P&gt;
  &lt;P&gt;I am facing a low performance after using AUSP table.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt; SELECT&lt;BR /&gt; objek,&lt;BR /&gt; atwrt AS ppo&lt;BR /&gt; FROM ausp&lt;BR /&gt; FOR ALL ENTRIES IN @lta_matnr&lt;BR /&gt; WHERE&lt;BR /&gt; objek = @lta_matnr-matnr&lt;BR /&gt; AND atinn = @ltp_output&lt;BR /&gt; AND atzhl = @lco_atzhl&lt;BR /&gt; AND mafid = @lco_mafid&lt;BR /&gt; AND klart = @lco_klart&lt;BR /&gt; AND datub &amp;gt; @sy-datum&lt;BR /&gt; INTO TABLE @DATA(lta_ausp).&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;This is the query I am using, I have mentioned all the key fields, but still the performance is degraded.&lt;/P&gt;
  &lt;P&gt;Any fix for this ?&lt;/P&gt;
  &lt;P&gt;Thank You,&lt;/P&gt;
  &lt;P&gt;Ankur.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 13:31:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503785#M2003420</guid>
      <dc:creator>former_member768291</dc:creator>
      <dc:date>2022-01-24T13:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue with AUSP table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503786#M2003421</link>
      <description>&lt;P&gt;If you want to use FOR ALL ENTRIES IN, follow the below best practice and see if it helps the performance.&lt;/P&gt;&lt;P&gt;-Pass lta_matnr to another temporal itab. DATA(lta_matnr_tmp) = lta_matnr.&lt;/P&gt;&lt;P&gt;-SORT  lta_matnr_tmp BY matnr. DELETE ADJACENT DUPLICATES FROM lta_matnr_tmp COMPARING matnr. This will reduce the number of rows.&lt;/P&gt;&lt;P&gt;-Add check before the select. IF lta_matnr_tmp IS NOT INITIAL, do the select. otherwise don't do the select. If lta_matnr_tmp is empty, FOR ALL ENTRIES IN will try to fetch all the records from AUSP.&lt;/P&gt;&lt;P&gt;-Finally use lta_matnr_tmp as the FOR ALL ENTRIES IN itab.&lt;/P&gt;&lt;P&gt;Or alternatively, you can use INNER JOIN to join lta_matnr instead of FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;Of course, you should still delete duplicates lta_matnr by above method to reduce the number so the performance improves.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT&lt;BR /&gt;AUSP~OBJEK,&lt;BR /&gt;AUSP~ATWRT AS PPO&lt;BR /&gt;FROM AUSP&lt;BR /&gt;##DB_FEATURE_MODE[ITABS_IN_FROM_CLAUSE] ##ITAB_KEY_IN_SELECT&lt;BR /&gt;INNER JOIN @LTA_MATNR AS LTA_MATNR&lt;BR /&gt;ON LTA_MATNR~MATNR = AUSP~OBJEK&lt;BR /&gt;WHERE AUSP~ATINN = @LTP_OUTPUT&lt;BR /&gt;AND AUSP~ATZHL = @LCO_ATZHL&lt;BR /&gt;AND AUSP~MAFID = @LCO_MAFID&lt;BR /&gt;AND AUSP~KLART = @LCO_KLART&lt;BR /&gt;AND AUSP~DATUB &amp;gt; @SY-DATUM&lt;BR /&gt;INTO TABLE @DATA(LTA_AUSP).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Jan 2022 13:51:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503786#M2003421</guid>
      <dc:creator>aoyang</dc:creator>
      <dc:date>2022-01-24T13:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue with AUSP table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503787#M2003422</link>
      <description>&lt;P&gt;yes, i have already done that before FOR ALL ENTRIES. First i have sorted the lta_matnr the delete adjacent duplicate and then checked for initial.&lt;/P&gt;&lt;P&gt;But still the performance is same.&lt;/P&gt;&lt;P&gt;i also tried with a left outer join in CDS.&lt;/P&gt;&lt;P&gt;But, sadly the performance is same.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 13:57:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503787#M2003422</guid>
      <dc:creator>former_member768291</dc:creator>
      <dc:date>2022-01-24T13:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue with AUSP table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503788#M2003423</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;gghosh123123&lt;/SPAN&gt; Please try INNER JOIN and see if it helps. &lt;/P&gt;&lt;P&gt;How many records are in lta_matnr?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 14:11:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503788#M2003423</guid>
      <dc:creator>aoyang</dc:creator>
      <dc:date>2022-01-24T14:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue with AUSP table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503789#M2003424</link>
      <description>&lt;P&gt;Right now there is only 3 records in lta_matnr &lt;/P&gt;&lt;P&gt;Before the addition of the AUSP table it was only taking 3-4 microseconds, but now its taking around 14-15.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 14:15:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503789#M2003424</guid>
      <dc:creator>former_member768291</dc:creator>
      <dc:date>2022-01-24T14:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue with AUSP table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503790#M2003425</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;gghosh123123&lt;/SPAN&gt;  3 records in lta_matnr should not take 15 sec. I feel like your index optimizer is not picking the right index for AUSP.&lt;/P&gt;&lt;P&gt;In my system, I put around 80,000 rows in lta_matnr and ran your SQL and came back in less than 1 sec. What is your DB? If it's non-HANA DB, can you try specifying index(in your case, N1 should be a good index. You can try to add ATWRT as the WHERE condition as well) and see if it helps? &lt;/P&gt;&lt;P&gt;Also, is it this note applicable to your system?&lt;/P&gt;&lt;P&gt;&lt;A href="https://launchpad.support.sap.com/#/notes/3081892" target="test_blank"&gt;https://launchpad.support.sap.com/#/notes/3081892&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 14:55:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503790#M2003425</guid>
      <dc:creator>aoyang</dc:creator>
      <dc:date>2022-01-24T14:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue with AUSP table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503791#M2003426</link>
      <description>&lt;P&gt;Could you execute a&lt;A href="https://launchpad.support.sap.com/#/solutions/scnwiki/?q=SQL%252520trace"&gt; SQL trace&lt;/A&gt;?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 16:28:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503791#M2003426</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2022-01-24T16:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue with AUSP table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503792#M2003427</link>
      <description>&lt;P&gt;Please edit your question, select your code and press the button [CODE], which makes the code appear colored/indented, it will be easier for people to look at it. Thank you! &lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 19:29:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-ausp-table/m-p/12503792#M2003427</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-01-24T19:29:56Z</dc:date>
    </item>
  </channel>
</rss>

