Application Development and Automation 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: 
Read only

Generate index for table

Former Member
0 Likes
1,655

Hi everybody,

we have a very large table (>100000 entries) where we often have to select via ABAP special records.

Unfortunatelly the field we are looking for is nt a key-feld. So the select takes a lot of time.

I would like to create an index. Are there any risks I have to consider?

After creating the index in SE11 --> Does the database generate the first initial index on its own or do I have to trigger the initial generation?

When yes --> How can I trigger the first initialization?

Thanks

Regards

Mario

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,589

Hi all,

thx for your replies.

I routet my problem to our admin. He will do this for me.

Regards

Mario

Hi everybody,

we have a very large table (>100000 entries) where we often have to select via ABAP special records.

Unfortunatelly the field we are looking for is nt a key-feld. So the select takes a lot of time.

I would like to create an index. Are there any risks I have to consider?

After creating the index in SE11 --> Does the database generate the first initial index on its own or do I have to trigger the initial generation?

When yes --> How can I trigger the first initialization?

Thanks

Regards

Mario

9 REPLIES 9
Read only

Former Member
0 Likes
1,589

Hi,

A simple rule would be index are picked based on WHERE clause.

Don't just create index for one-of-scenario. There are problems .

thanks

Vijay

Read only

0 Likes
1,589

Hi Vijay,

thx.

what problems do you see?

Regards

Mario

Read only

0 Likes
1,589
Read only

0 Likes
1,589

Hi Vijay,

could you pls. explain:

A simple rule would be index are picked based on WHERE clause.

I am not sure waht you men.

Regards

Mario

Read only

0 Likes
1,589

HI,

It depends on for which table you create. It gives problem during insert/update as index is known for sorting.

Thanks

Vijay

Read only

0 Likes
1,589

Hi,

Say we have primary index for table in this order as  A-B-C-D.

So where condition should also be in the same order as  it-a = A and it-b = B etc.

Since you need to select values in this order as It-c = C and it-b = B .


Since where condition checks for primary index, if you create secondary index for table as C-B ,

than where condition sorts the data of a table as secondary index you created.

Hope you got it.

thanks

Vijay

Read only

0 Likes
1,589

HI Vijay,

sorry, but I dont catch your english 😞

Regards

Mario

Read only

Former Member
0 Likes
1,590

Hi all,

thx for your replies.

I routet my problem to our admin. He will do this for me.

Regards

Mario

Read only

Former Member
0 Likes
1,589

Hi Mario,

You can read this thread (last answer) to see the risks involved - http://scn.sap.com/thread/3643856.

Please take care that there are not many secondary indices on your table and that it does not contain too many fields. Its not good for the performance.

You can see how to create secondary indices here: http://help.sap.com/saphelp_nw73/helpdata/en/cf/21eb47446011d189700000e8322d00/content.htm

Let me know if you face any issues.