<?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 Index usage in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/index-usage/m-p/6692481#M1451335</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an index already created on LIKP on 2 fields &lt;/P&gt;&lt;P&gt;VKORG and WADAT_IST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my selection criteria on the table has 3 fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VKORG, LFART and WADAT_IST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, does the select stmt uses the index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For various reasons, we cannot change the existing index and also create a new one.&lt;/P&gt;&lt;P&gt;If it does not use, is there a way that we can force the system to use that index, if so any disadvantages?&lt;/P&gt;&lt;P&gt;Please suggest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;-Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Mar 2010 14:28:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-09T14:28:58Z</dc:date>
    <item>
      <title>Index usage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/index-usage/m-p/6692481#M1451335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an index already created on LIKP on 2 fields &lt;/P&gt;&lt;P&gt;VKORG and WADAT_IST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my selection criteria on the table has 3 fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VKORG, LFART and WADAT_IST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, does the select stmt uses the index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For various reasons, we cannot change the existing index and also create a new one.&lt;/P&gt;&lt;P&gt;If it does not use, is there a way that we can force the system to use that index, if so any disadvantages?&lt;/P&gt;&lt;P&gt;Please suggest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;-Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 14:28:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/index-usage/m-p/6692481#M1451335</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T14:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Index usage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/index-usage/m-p/6692482#M1451336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes there is a way you can point to an index, use %_hints in the select instruction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    SELECT bukrs gjahr belnr blart budat usnam tcode
      awtyp bldat cpudt INTO TABLE t_bkpf FROM bkpf WHERE
      bukrs = s_bukrs-low AND
      budat BETWEEN s_budat-low and s_budat-high
*      budat in s_budat
      %_hints ORACLE 'BKPF~2'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, you can use only two fields in the selection criteria and then delete from the internal table where it does not match the 3rd field criteria, sometimes it's faster that way, depending on the volume of data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 14:37:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/index-usage/m-p/6692482#M1451336</guid>
      <dc:creator>PedroGuarita</dc:creator>
      <dc:date>2010-03-09T14:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Index usage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/index-usage/m-p/6692483#M1451337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Run the trace in st05, check the Filter predicates and access predicates.&lt;/P&gt;&lt;P&gt;You can also force the index by using Oracle hints.&lt;/P&gt;&lt;P&gt;Please search in forum for more details.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 14:46:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/index-usage/m-p/6692483#M1451337</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-03-09T14:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Index usage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/index-usage/m-p/6692484#M1451338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One usually codes the where clause to list the conditions in the same order as the index field list.  The fact that you have another field would indicate that the index table itself cannot be the only determining factor in whether a row will be retained, and that will cause a small performance degradation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I were doing this, I would write the where clause in index field sequence (vkorg, wadat_ist, then lfart), execute with ST05 on, and review/explain the open/reopen on LIKP.  You may find that the index is used, or you may find that the database optimizer chooses another index.  If another index, review that list...it may actually be a better choice (we usually trust the db optimizer to make the right choice, particularly if runstats are kept up to date).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 14:50:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/index-usage/m-p/6692484#M1451338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T14:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Index usage</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/index-usage/m-p/6692485#M1451339</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;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; I have an index already created on LIKP on 2 fields &lt;/P&gt;&lt;P&gt;&amp;gt; VKORG and WADAT_IST.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; But my selection criteria on the table has 3 fields&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; VKORG, LFART and WADAT_IST.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; So, does the select stmt uses the index.&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the optimizer SHOULD use it. But you'd better doublecheck with ST05 / ST04.&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>Tue, 09 Mar 2010 14:57:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/index-usage/m-p/6692485#M1451339</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2010-03-09T14:57:48Z</dc:date>
    </item>
  </channel>
</rss>

