06-28-2007 1:35 PM
06-28-2007 1:38 PM
Yes we can add indexes into standard SAP tables.
To do that, in SE11 give the table name and display it. You will get INDEXES.. button on the application tooolbar. Press that, and there is an option to create your own index
Regards,
Sandip
06-28-2007 2:47 PM
Hi
Primary index : Its the index which is automatically created for the PRIMARY KEY FIELD(S) of the table.
The primary index is always created automatically in the R/3 System. It consists of the primary key fields of the database table. This means that for each combination of fields in the index, there is a maximum of one line in the table. This kind of index is also known as UNIQUE.
Secondary index : Its created as and when required,
based upon other field(s) of the table,
on which search criteria is used in sqls.
Secondary indexes should contain columns that you use frequently in a selection, and that are as highly selective as possible. The fewer table entries that can be selected by a certain column, the higher that columns selectivity. Place the most selective fields at the beginning of the index. Your secondary index should be so selective that each index entry corresponds to at most five percent of the table entries. If this is not the case, it is not worth creating the index. You should also avoid creating indexes for fields that are not always filled, where their value is initial for most entries in the table.
Goto SE11
enter table
from the menu goto Indexes
create the indexes by pressing the CREATE button with the required fields
and use those fields when fetching data from this table in the where condition of the select statement
Reward points for useful Answers
Regards
Anji
06-28-2007 2:58 PM
Yes, you can, but you probaly shouldn't. You need to do some analysis before doing this.
Rob
06-28-2007 4:04 PM
06-28-2007 7:47 PM
Hi Ramesh,
Yes, we can...
reward for all useful asnwers and close the thread.
06-29-2007 4:45 AM
Yes we can add secondary index for sap table ... it is one of the Performance tuning point .
Secondary Database
Creating Secondary Indexes
Procedure
Result
What to Keep in Mind for Secondary Indexes
How well an existing index supports data selection from a table largely depends on whether the data selected with the index represents the data that will ultimately be selected. This can best be shown using an example.
An index is defined on fields FIELD1, FIELD2, FIELD3 and FIELD4 of table BSPTAB in this order. This table is accessed with the SELECT statement:
SELECT * FROM BSPTAB WHERE FIELD1 = X1 AND FIELD2 = X2 AND FIELD4= X4
.
Since FIELD3 is not specified more exactly, only the index sorting up to FIELD2 is of any use. If the database system accesses the data using this index, it will quickly find all the records for which FIELD1 = X1 and FIELD2 = X2. You then have to select all the records for which FIELD4 = X4 from this set.
The order of the fields in the index is very important for the accessing speed. The first fields should be those which have constant values for a large number of selections. During selection, an index is only of use up to the first unspecified field.
Only those fields that significantly restrict the set of results in a selection make sense for an index.
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. Different indexes on the same table are distinguished with a three-place index identifier.
reward points if it is usefull ...
Girish
06-29-2007 7:48 AM
hi ramesh,
we can add secondary indexes in sap defined tables. just goto se11...enter table name--> display
now inside u will get indexes push button on application toolbar..just click on it..and create ....
in that in index name enter table name and give an ID for that index by Z....
enter the fields on which u want to do indexing...click on save and activate it...
hope this will be usefull...
please reward in case usefull...
regards,
prashant