Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Secondary index

Former Member
0 Kudos

How will you decide on which fields we should build a secondary index

How many max can we create

regds

kiran

9 REPLIES 9

Former Member
0 Kudos

In case you often execute SQL SELECT statements on a table and you use fields in you WHERE clause, that are not mentioned in the primary index, you normaly create a secondary index containing these fields ...

Former Member
0 Kudos

thanx mike.

But if u already see some std tables, they built secondary indexes.right

now am creating some huge tables also. and how can i decide on which fields i shud build those indexes and how many can i do.

i no its 4. am i right

kiran

0 Kudos

First, you should determine, who uses the table (which programs). Second, you should analyse the statements executed by these programs agains this table. And third, you then know, which fields are uses by the programs as key fields.

Former Member
0 Kudos

Hi Kiran,

AS per the requirement if u want to access the data very frequently. To make the data to be accessed faster we have to Create Secondary Index. You can create 9 Secondary Indexes.

Bye

Murthy

Former Member
0 Kudos

We create the tables and another person is going to query those tables.

Today, he may query on some conditions but again we may have to query in some other way at some other time.

so is there no standard approach to build these indexes?

regds

kiran

0 Kudos

No, there is not stadard solution for this problem. But you will run into performance issues, as soon as there are indexes missing, so this might be a kind of indicator for misconfigured indexes ...

0 Kudos

Hi Kiran,

There is no standard uproach for creawting a secondary index. It is purely upto your requirement.

You can create many secondary indexes, but as the number of indexes grow the performance will decrease during table updates, as it has to update all secondary indexes also.

Always you need to create Sec. indexes for fields for which you know there could be a possible search on those fields. Otheerwise there is no point in using.

If the usage is done by someone else. you just have to forecast things and try to optimize more. Oterthan this you don't have to worry much.

Thanks with regards,

Surendra

0 Kudos

Hi kiran,

1. so is there no standard approach to build these indexes?

You are right, there is no standard approach.

2. The user can query/sort on any field,

DOES NOT MEAN that we should create index

on each of such fields.

(Creating more and more index,

has one draw back also.

Everytime any record is added to the table,

ALL THOSE index are ALSO UPDATED by the database).

(Moreover, creating too many indexes,

can slow down the performance)

regards,

amit m.

anversha_s
Active Contributor
0 Kudos

hi,

You can just create it via SE11.

Are you supposed to make them aware? Is this for a custom DB, or a standard SAP table.

If it is a standard SAP table, I would suggest making them aware, so that they can monitor any spikes in performance during UPDATES.

http://help.sap.com/saphelp_470/helpdata/en/cf/21eb47446011d189700000e8322d00/frameset.htm

http://help.sap.com/saphelp_470/helpdata/en/cf/21eb47446011d189700000e8322d00/frameset.htm

Regards

Anver,

if hlped pls mark points