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

Select Statement

Former Member
0 Likes
577

Hi,

I have a table with a key field and a non-key field. This table has around 6 million records.

My ABAP statement is:


select single non-key-field from table where key-field = variable.

Can you'll please give me some other tips to increase efficiency of this select statement further.

Thanks,

CD

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
550

Hi ,

If you want to increase the performance further , then create a new index with both key field and non-key field so that a new key field come into existence.

Next use the same select single with that new key field...... Certainly it will improve the performance of select single as you increase the number of fields in the key...

Hope it will help you...

Thanks,

Rajesh.

4 REPLIES 4
Read only

Former Member
0 Likes
550

since you have a single key field, and as you are using a select single, the select is already using the index and selecting only the one record that matchs. I don't think it can bet tuned further.

Read only

Sandra_Rossi
Active Contributor
0 Likes
550

If you have issues with performance on this SELECT (it's well written), check table statistics at database level

Read only

guilherme_frisoni
Contributor
0 Likes
550

Hi,

the key-field in your where condition is the only index field or it is IN table index?

Frisoni

Read only

Former Member
0 Likes
551

Hi ,

If you want to increase the performance further , then create a new index with both key field and non-key field so that a new key field come into existence.

Next use the same select single with that new key field...... Certainly it will improve the performance of select single as you increase the number of fields in the key...

Hope it will help you...

Thanks,

Rajesh.