<?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 and Index in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-and-index/m-p/5676219#M1290451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Simple,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; 1. If sql created with search criteria does not match the index created, will it cause performance to be slower?&lt;/P&gt;&lt;P&gt;&amp;gt; Simple&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you end up with an inapproriate execution plan: yes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; 2. May i know what are the things to take note when creating index for better performance?&lt;/P&gt;&lt;P&gt;&amp;gt; Simple&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try put those fields in the index that are used with = and in  in the beginning.&lt;/P&gt;&lt;P&gt;Fields with selective ranges (LIKE PATTERN% or BETWEEN, ...) may be addeed.&lt;/P&gt;&lt;P&gt;choose these fields from those conditions that limit your result set most.&lt;/P&gt;&lt;P&gt;Think of other sqls too.... if this is not your only and/or most important sql statement.&lt;/P&gt;&lt;P&gt;Considering other sqls too, try to build 'good enough' indexes. Building the optimal index&lt;/P&gt;&lt;P&gt;for each statement would lead to a high number of indexes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; 3. How can i test and verify that my sql and index is created with better performance?&lt;/P&gt;&lt;P&gt;&amp;gt; Simple&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use ST05. In the STatements Summary evaluate the avg time/ r  value.&lt;/P&gt;&lt;P&gt;Other than that use the database specific cursor cache (ST04) and check how much pages/blocks are&lt;/P&gt;&lt;P&gt;read per row or execution.&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>Mon, 25 May 2009 04:59:31 GMT</pubDate>
    <dc:creator>HermannGahm</dc:creator>
    <dc:date>2009-05-25T04:59:31Z</dc:date>
    <item>
      <title>SQL and Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-and-index/m-p/5676218#M1290450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;i searched the forum but am still lost for the following.&lt;/P&gt;&lt;P&gt;1. If sql created with search criteria does not match the index created, will it cause performance to be slower?&lt;/P&gt;&lt;P&gt;2. May i know what are the things to take note when creating index for better performance?&lt;/P&gt;&lt;P&gt;3. How can i test and verify that my sql and index is created with better performance?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Simple&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 04:14:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-and-index/m-p/5676218#M1290450</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T04:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: SQL and Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-and-index/m-p/5676219#M1290451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Simple,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; 1. If sql created with search criteria does not match the index created, will it cause performance to be slower?&lt;/P&gt;&lt;P&gt;&amp;gt; Simple&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you end up with an inapproriate execution plan: yes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; 2. May i know what are the things to take note when creating index for better performance?&lt;/P&gt;&lt;P&gt;&amp;gt; Simple&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try put those fields in the index that are used with = and in  in the beginning.&lt;/P&gt;&lt;P&gt;Fields with selective ranges (LIKE PATTERN% or BETWEEN, ...) may be addeed.&lt;/P&gt;&lt;P&gt;choose these fields from those conditions that limit your result set most.&lt;/P&gt;&lt;P&gt;Think of other sqls too.... if this is not your only and/or most important sql statement.&lt;/P&gt;&lt;P&gt;Considering other sqls too, try to build 'good enough' indexes. Building the optimal index&lt;/P&gt;&lt;P&gt;for each statement would lead to a high number of indexes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; 3. How can i test and verify that my sql and index is created with better performance?&lt;/P&gt;&lt;P&gt;&amp;gt; Simple&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use ST05. In the STatements Summary evaluate the avg time/ r  value.&lt;/P&gt;&lt;P&gt;Other than that use the database specific cursor cache (ST04) and check how much pages/blocks are&lt;/P&gt;&lt;P&gt;read per row or execution.&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>Mon, 25 May 2009 04:59:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-and-index/m-p/5676219#M1290451</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2009-05-25T04:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: SQL and Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-and-index/m-p/5676220#M1290452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; i searched the forum &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your questions, I sincerely doubt that. Maybe you didn't use any index while searching?&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 10:04:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-and-index/m-p/5676220#M1290452</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-05-25T10:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: SQL and Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-and-index/m-p/5676221#M1290453</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;check below link for index for better formanes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SE30 &lt;/P&gt;&lt;P&gt;/people/siegfried.boes/blog/2007/11/13/the-abap-runtime-trace-se30--quick-and-easy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ST05&lt;/P&gt;&lt;P&gt;/people/siegfried.boes/blog/2007/09/05/the-sql-trace-st05-150-quick-and-easy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 10:06:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-and-index/m-p/5676221#M1290453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T10:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: SQL and Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-and-index/m-p/5676222#M1290454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the questions which you ask don't like coming from a real problem but it is more an interview type:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+ First you should ignore the index, and determine whether performance is o.k. or not,&lt;/P&gt;&lt;P&gt;   the above mentioned blog on the SQL tells you hwo.&lt;/P&gt;&lt;P&gt;   Usually the time per row is used as indicator (you must verify it), whether reading is slow or&lt;/P&gt;&lt;P&gt;   fast.  Please do not forget to execute it several times, before you take the trace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+ if it is slow you should determine why, a missing index is one of several possibilities.&lt;/P&gt;&lt;P&gt;   Lets assume the index is the reason. Then you must check, whether you task is important&lt;/P&gt;&lt;P&gt;   enough to create an index, a one-time event does not get an index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Index creation for one Select is usally not so difficullt, index creation with check other accesses,&lt;/P&gt;&lt;P&gt;   need several pages ... After creation in dictionary, the index must be created on the database&lt;/P&gt;&lt;P&gt;   and statistics must be created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+ To confirm the usage of the index, the SQL trace helps you again, the new index should appear in&lt;/P&gt;&lt;P&gt;   the access path&lt;/P&gt;&lt;P&gt;   =&amp;gt;  &lt;STRONG&gt;but most important the execution time should be much better&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 10:25:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-and-index/m-p/5676222#M1290454</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-25T10:25:11Z</dc:date>
    </item>
  </channel>
</rss>

