<?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: DB Index in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/db-index/m-p/3673134#M884628</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe this is an automatic task..based on your select query on the database the proper index is analysed and used...&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;the only requirement is that the select query must contain the fields in "where" clause exactly in the order mentioned in the required index..otherwise the index won't be taken&lt;/STRONG&gt;.....but it can be traced using &lt;STRONG&gt;ST05&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the steps below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open a transaction called ST05 in a separate session. This is used to analyze the SQL trace&lt;/P&gt;&lt;P&gt;Open the program (SE38) in a separate session and put a break point at the select statement where you would like to find out the index being used.Next, we execute the program and it stops at the break point. Then, you click on trace-on in the ST05 transaction. Press F5 (debugging) in the program to execute that select statement. After executing the select statement, click on trace-off in the ST05 transaction.&lt;/P&gt;&lt;P&gt;Next, Click on Trace list which displays basic trace list of the select statement we executed. We can find out which index being used by choosing the function EXPLAIN SQL after putting the cursor on one of statements (PREPARE, OPEN, REOPEN). &lt;/P&gt;&lt;P&gt;We get the complete execution plan for the SQL statement. This will tell you about which index is being used&lt;/P&gt;&lt;P&gt;Clicking on any one of these indexes would give you detailed information on that particular Index  &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;Byju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Apr 2008 12:17:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-03T12:17:24Z</dc:date>
    <item>
      <title>DB Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db-index/m-p/3673131#M884625</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;&lt;/P&gt;&lt;P&gt;i have created Secondary index for a Transparent table.How can i assured that while retrieving data from Table using Select query,secondary index that i created is working..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2008 12:05:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db-index/m-p/3673131#M884625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-03T12:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: DB Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db-index/m-p/3673132#M884626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If you want to specify index in the SELECT , try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select ERDAT WERKS MATNR&lt;/P&gt;&lt;P&gt;from LIPS &lt;/P&gt;&lt;P&gt;into table Itab &lt;/P&gt;&lt;P&gt;Where erdat in s_erdat &lt;/P&gt;&lt;P&gt;and werks in s_werks&lt;/P&gt;&lt;P&gt;and Matnr in s_matnr&lt;/P&gt;&lt;P&gt;%_HINTS oracle &amp;#145;index(&amp;#147;ERDAT&amp;#148; &amp;#147;ERDAT~001&amp;#148;)&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: here 001 is ur index name.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2008 12:10:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db-index/m-p/3673132#M884626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-03T12:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: DB Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db-index/m-p/3673133#M884627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The database system will use the optimal index but this does depend on your selection as well.&lt;/P&gt;&lt;P&gt;When doing a select make sure you are using your index fields (correct order).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also check this when doing a trace using transaction ST05. You can see if your index was used or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way: it is not recommended to use oracle hints, since this is a platform dependant statement. Will work though if you are using oracle database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Micky Oestreich on Apr 3, 2008 2:12 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2008 12:12:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db-index/m-p/3673133#M884627</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-04-03T12:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: DB Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db-index/m-p/3673134#M884628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe this is an automatic task..based on your select query on the database the proper index is analysed and used...&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;the only requirement is that the select query must contain the fields in "where" clause exactly in the order mentioned in the required index..otherwise the index won't be taken&lt;/STRONG&gt;.....but it can be traced using &lt;STRONG&gt;ST05&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the steps below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open a transaction called ST05 in a separate session. This is used to analyze the SQL trace&lt;/P&gt;&lt;P&gt;Open the program (SE38) in a separate session and put a break point at the select statement where you would like to find out the index being used.Next, we execute the program and it stops at the break point. Then, you click on trace-on in the ST05 transaction. Press F5 (debugging) in the program to execute that select statement. After executing the select statement, click on trace-off in the ST05 transaction.&lt;/P&gt;&lt;P&gt;Next, Click on Trace list which displays basic trace list of the select statement we executed. We can find out which index being used by choosing the function EXPLAIN SQL after putting the cursor on one of statements (PREPARE, OPEN, REOPEN). &lt;/P&gt;&lt;P&gt;We get the complete execution plan for the SQL statement. This will tell you about which index is being used&lt;/P&gt;&lt;P&gt;Clicking on any one of these indexes would give you detailed information on that particular Index  &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;Byju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2008 12:17:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db-index/m-p/3673134#M884628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-03T12:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: DB Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db-index/m-p/3673135#M884629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure you use all keys specified in your DB Index...System will automatically use the index you have created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mohaiyuddin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2008 12:18:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db-index/m-p/3673135#M884629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-03T12:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: DB Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db-index/m-p/3673136#M884630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. 'Activate' an SQL trace using ST05&lt;/P&gt;&lt;P&gt;2. Run your program&lt;/P&gt;&lt;P&gt;3. Deactivate and display the trace (using ST05 again) &lt;/P&gt;&lt;P&gt;4. Select the line in the trace display where the table is 'OPENed', and hit the 'explain' button&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points not needed ... a simple 'thank you' works for me &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2008 12:19:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db-index/m-p/3673136#M884630</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-03T12:19:51Z</dc:date>
    </item>
  </channel>
</rss>

