<?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: Indexes in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522512#M239751</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kantheri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;1. SECONDARY INDEX.&lt;/P&gt;&lt;P&gt;They are generally used for faster access.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EG.&lt;/P&gt;&lt;P&gt;In a table there are 10 fields.&lt;/P&gt;&lt;P&gt;1,2 are primary fields (primary index)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. But the table is queried many times&lt;/P&gt;&lt;P&gt;on field number 6 (eg).&lt;/P&gt;&lt;P&gt;So we can create a NEW Index&lt;/P&gt;&lt;P&gt;(Secondary index)&lt;/P&gt;&lt;P&gt;only on that 6th field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Due to this,&lt;/P&gt;&lt;P&gt;the sql will become faster &lt;/P&gt;&lt;P&gt;because NOW&lt;/P&gt;&lt;P&gt;the database will search on the&lt;/P&gt;&lt;P&gt;basis of secnodary index (made on 6th field)&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Sep 2006 06:37:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-01T06:37:59Z</dc:date>
    <item>
      <title>Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522510#M239749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do we make use of indexes in a table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 06:35:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522510#M239749</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-01T06:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522511#M239750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;put ur Where Clause based on the Index Fields.&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;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 06:37:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522511#M239750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-01T06:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522512#M239751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kantheri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;1. SECONDARY INDEX.&lt;/P&gt;&lt;P&gt;They are generally used for faster access.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EG.&lt;/P&gt;&lt;P&gt;In a table there are 10 fields.&lt;/P&gt;&lt;P&gt;1,2 are primary fields (primary index)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. But the table is queried many times&lt;/P&gt;&lt;P&gt;on field number 6 (eg).&lt;/P&gt;&lt;P&gt;So we can create a NEW Index&lt;/P&gt;&lt;P&gt;(Secondary index)&lt;/P&gt;&lt;P&gt;only on that 6th field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Due to this,&lt;/P&gt;&lt;P&gt;the sql will become faster &lt;/P&gt;&lt;P&gt;because NOW&lt;/P&gt;&lt;P&gt;the database will search on the&lt;/P&gt;&lt;P&gt;basis of secnodary index (made on 6th field)&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 06:37:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522512#M239751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-01T06:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522513#M239752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt; Indexes are used to speed up the search in a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can create index for fields you pass it in the where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indexes will be failed in a select query with logical operators OR and NOT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;krishnakumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 06:39:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522513#M239752</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-01T06:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522514#M239753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT carrid connid cityfrom
FROM spfli INTO (xcarrid, xconnid, xcityfrom)
WHERE carrid = 'LH ' AND cityfrom = 'FRANKFURT'
%_HINTS ORACLE 'INDEX("SPFLI" "SPFLI~001")'.
WRITE: / xcarrid, xconnid, xcityfrom.
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 06:39:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522514#M239753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-01T06:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522515#M239754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you need to access your table by means that are not part of the key, then an index on the those fields would help the speed of the select statement. Be warned, that addtional indexes could have a negative effect on the performance when doing database updates. In my experience, I have never really seen this occur, not enough to notice anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, say you have a custom table like so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MANDT   Key Field&lt;/P&gt;&lt;P&gt;VBELN   Key Field&lt;/P&gt;&lt;P&gt;POSNR&lt;/P&gt;&lt;P&gt;MATNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say that you need to access it like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * into corresponding fields of table itab&lt;/P&gt;&lt;P&gt;          from ztable&lt;/P&gt;&lt;P&gt;                 where matnr in s_matnr.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, you are trying to access the table by MATNR which is not part of the primary key. You can create an index to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MANDT       Key Field&lt;/P&gt;&lt;P&gt;MATNR       Key Field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The performace of the select statement above will be greatly increased. Especially over a large number of records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 06:41:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522515#M239754</guid>
      <dc:creator>dani_mn</dc:creator>
      <dc:date>2006-09-01T06:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522516#M239755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The primary index contains the key fields of the table and a pointer to the non-key fields of the table. The primary index is created automatically when the table is created in the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also create further indexes on a table in the ABAP Dictionary. These are called secondary indexes. This is necessary if the table is frequently accessed in a way that does not take advantage of the sorting of the primary index for the access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use the indexes with READ statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE tab1 INDEX sy-index INTO wa_tab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 06:43:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522516#M239755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-01T06:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522517#M239756</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;The indexes are used in the selects if the WHERE conditions are made in according with the indexes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you have an index with following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- FIELD1&lt;/P&gt;&lt;P&gt;- FIELD2&lt;/P&gt;&lt;P&gt;- FIELD3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It'll be used in a select if the WHERE condition is like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM &amp;lt;TABLE&amp;gt; WHERE FIELD1 =&lt;/P&gt;&lt;P&gt;                        AND FIELD2 =&lt;/P&gt;&lt;P&gt;                        AND FIELD3 =  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An index can partially used in select like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM &amp;lt;TABLE&amp;gt; WHERE FIELD1 =&lt;/P&gt;&lt;P&gt;                        AND FIELD2 =   .   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 06:44:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522517#M239756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-01T06:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522518#M239757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi S Kantheri, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use indexes in the where clause of your select statements. For example, some of your fields in the where clause are not primary keys so what you can do is to check first in SE11 of a given table if it has an existing index that you can use. If not, you can create one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, I need to use SHKZG, BLART and MONAT in the where clause of my select statement. These fields are not primary key fields of table BSIS. So using them without indexes will give you a poor performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. Please award points for useful answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 06:46:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1522518#M239757</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-09-01T06:46:48Z</dc:date>
    </item>
  </channel>
</rss>

