Creation of secondary indexes in database tables
Very often, the cause of a long running report is full-scan of a database table specified within the code, mainly because no suitable index exists. In this recipe, we will see the steps required in creating a new secondary index in database table for performance improvement. Creating indexes lets you optimize standard reports as well as your own reports. In this recipe, we will create a secondary index on a test table ZST9_VBAK
(that is simply a copy of VBAK
).
How to do it...
For creating a secondary index, proceed as follows:
Call transaction
SE11
. Enter the name of the table in the field provided, in our case,ZST9_VBAK
. Then click the Display button. This will take you to the Display Table screen.Next, choose the menu path Goto | Indexes. This will display all indexes that currently exist for the table.
- Click the Create button and then choose the option Create Extension Index.
The dialog box appears. Enter a three-digit name for the index...