<?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: SQL-Performance Problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-performance-problem/m-p/9063187#M1702866</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;If you are talking about performance,... avoid "Select *&amp;nbsp; "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Maria João Rocha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Oct 2012 16:40:50 GMT</pubDate>
    <dc:creator>MariaJooRocha</dc:creator>
    <dc:date>2012-10-10T16:40:50Z</dc:date>
    <item>
      <title>SQL-Performance Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-performance-problem/m-p/9063183#M1702862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've a question.&lt;/P&gt;&lt;P&gt;How can I analyze the performance of an database table and there indizes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have the following sql statement:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;SELECT &lt;SPAN class="L0S52"&gt;SINGLE &lt;/SPAN&gt;* &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;aufk&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WHERE &lt;/SPAN&gt;aufnr &lt;SPAN class="L0S52"&gt;EQ &lt;/SPAN&gt;is_rm&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;aufnr&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;AND &lt;/SPAN&gt;auart &lt;SPAN class="L0S52"&gt;EQ &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'PP01' &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OR &lt;/SPAN&gt;auart &lt;SPAN class="L0S52"&gt;EQ &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'PP02'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;And it seems to be very slow.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;If I make the same access (with same aufnr) via SE16 it runs perfect. But in an abap program it is very slow.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;It seems, as this problem occurs, since we have activated database compression.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;We use oracle 11.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Any ideas, how to check the table, if the indizes are ok?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Thx in advance&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 15:18:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-performance-problem/m-p/9063183#M1702862</guid>
      <dc:creator>Private_Member_19084</dc:creator>
      <dc:date>2012-10-10T15:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: SQL-Performance Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-performance-problem/m-p/9063184#M1702863</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 would suggest you to modify the select statement like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM aufk&lt;/P&gt;&lt;P&gt;WHERE aufnr = ...&lt;/P&gt;&lt;P&gt;AND ( auart = 'PP01' OR auart = 'PP02' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This brackets may help in getting the statement to be more precise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hardik Mehta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 15:27:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-performance-problem/m-p/9063184#M1702863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-10T15:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: SQL-Performance Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-performance-problem/m-p/9063185#M1702864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are using the primary key to select so the primary unique index should be picked up automatically. Still you might want to check that in SQL Trace ( ST05 ). Incase you see that the correct index is not picked up( Though It is quite unlikely) then you can try passing the AUART in a range table using two lines as SIGN = 'I' and OPTION = 'EQ' and LOW as AUART.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do the same thing via SE16 along with both AUFNR and AUART filled up and SQL trace running on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 16:37:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-performance-problem/m-p/9063185#M1702864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-10T16:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: SQL-Performance Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-performance-problem/m-p/9063186#M1702865</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;Use TC ST05.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Maria João Rocha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 16:39:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-performance-problem/m-p/9063186#M1702865</guid>
      <dc:creator>MariaJooRocha</dc:creator>
      <dc:date>2012-10-10T16:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: SQL-Performance Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-performance-problem/m-p/9063187#M1702866</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;If you are talking about performance,... avoid "Select *&amp;nbsp; "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Maria João Rocha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 16:40:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-performance-problem/m-p/9063187#M1702866</guid>
      <dc:creator>MariaJooRocha</dc:creator>
      <dc:date>2012-10-10T16:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: SQL-Performance Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-performance-problem/m-p/9063188#M1702867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I look at the ABAP statement this recommendation seems to be the most relevant one &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1031/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I'm afraid the original ABAP statement is understood by the system like:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;SELECT &lt;SPAN class="L0S52"&gt;SINGLE &lt;/SPAN&gt;* &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;aufk&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WHERE&amp;nbsp; ( &lt;/SPAN&gt;aufnr &lt;SPAN class="L0S52"&gt;EQ &lt;/SPAN&gt;is_rm&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;aufnr&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;AND &lt;/SPAN&gt;auart &lt;SPAN class="L0S52"&gt;EQ &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'PP01' ) &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OR &lt;/SPAN&gt;auart &lt;SPAN class="L0S52"&gt;EQ &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'PP02'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in that case the system separately looks for all orders of type PP02 using only a client in one of the indexes or even a full table scan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 06:18:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-performance-problem/m-p/9063188#M1702867</guid>
      <dc:creator>yuri_ziryukin</dc:creator>
      <dc:date>2012-10-11T06:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: SQL-Performance Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-performance-problem/m-p/9063189#M1702868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;oh dammit, I am an idiot.&lt;/P&gt;&lt;P&gt;I searched for performance problems and so on, and the problem is so simple.&lt;/P&gt;&lt;P&gt;Sorry that I've overlooked at this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thx for fast help and tips, to everyone&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 07:06:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-performance-problem/m-p/9063189#M1702868</guid>
      <dc:creator>Private_Member_19084</dc:creator>
      <dc:date>2012-10-11T07:06:39Z</dc:date>
    </item>
  </channel>
</rss>

