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

index for a table

witold_kimak
Explorer
0 Likes
1,059

I would like to ask when it makes sense to create an index for a table, e.g. ONRVB at the moment it takes 3.006.358 ms to select one enntry.

I would like to ask when it makes sense to create an index for a table, e.g. ONRVB at the moment it takes 3.006.358 ms to select one enntry.

6 REPLIES 6
Read only

Former Member
0 Likes
1,016

HI,

It depends on the number of records existing in that table, and the key you are using in your where clause.

In you exapmle the table for ONRVB you can create the in dex with these fields objnr, vbeln, posnr

Regards,

Satish

Read only

Former Member
0 Likes
1,016

It makes more sense to try to optimize the query. Do you want to add an index for a single SELECT statement in a single program??

Rob

Read only

Former Member
0 Likes
1,016

Hi,

Basically index are provided to improve performance. i.e with index select on db tables retrieves data much faster.

for more details u can check the given below link,

/thread/493689 [original link is broken]

with regards,

Archana

Read only

Former Member
0 Likes
1,016

hi At the preparation of EWA ,it recognize to create an index for a table. regards suren.s

Read only

alex_m
Active Contributor
0 Likes
1,016

You need to consider few points before creating an index.

1.How much the Index going to be used, for single program or in single select?.

2.Any possibilities to fine tune your select query.

3.Think twice before creating index.

Read only

Former Member
0 Likes
1,016

Hi Witold

It is always better to optimize your where clause rather creating index. Before creating any index you should first check what is the frequency of its usage. Moreover many a times creating index ends up in having side effects as some times database engine may choose ur new index instead which could be not be valuable. Hence before creating any index we need to think twice and try to optimize what we have.

Cheers

Vaibhav