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

Performance issue on KONV table

Former Member
0 Likes
2,308

Hi All,       i am facing performance issue with following select query. i have 5000 knumh values and i just want to check atleast one knumh exist in konv table or not. Can anyone help me to improve below select SELECT * FROM konv INTO TABLE lt_konv up to 1 row where knumh in lr_knumh. Note : No of entries(from Se11) in KONV table is very huge. getting runtime error after 90min. Regards, Praveen

Hi All,       i am facing performance issue with following select query. i have 5000 knumh values and i just want to check atleast one knumh exist in konv table or not. Can anyone help me to improve below select SELECT * FROM konv INTO TABLE lt_konv up to 1 row where knumh in lr_knumh. Note : No of entries(from Se11) in KONV table is very huge. getting runtime error after 90min. Regards, Praveen

6 REPLIES 6
Read only

Former Member
0 Likes
1,496

Hi Praveen,

If your requirement is just to check if at least one entry exits then do the below piece.

Hope you are already removing duplicates from your range table

SORT LR_KNUMH BY LOW.

DELETE ADJACENT DUPLICATES FROM LR_KNUMH COMPARING LOW.

SELECT COUNT( * ) UP TO 1 ROW

FROM KONV

WHERE KNUMH IN  LR_KNUMH.

The above statement does not need any container to hold select data. If it finds even 1 entry, your sy-subrc eq 0.

Regards,

Raju

Read only

Former Member
0 Likes
1,496

Why you are querying via KNUMH? KONV is cluster table. Only good way to select from it via KNUMV.

R

Read only

0 Likes
1,496

can you explain your requirement? may be we can suggest an alternate solution.

KONV is a cluster table and you should avoid reading from it without using all the primary keys.

Read only

Ankit_Maskara
Product and Topic Expert
Product and Topic Expert
0 Likes
1,496

Hello,

This advice won't help directly, but you should use Select....EndSelect when you want to fetch a single record and you do not have primary key in the where clause else go for Select Single.

BR.

Read only

Former Member
0 Likes
1,496

Hi,

ur statement should only last a few sec. you can try selecting via se16.your programm should take the same time.

for selecting single value, i would use "select single"-statement.

im not very common with the cluster tables. But maybe a new index can help?

regards

Stefan Seeburger.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,496

Cluster table behind KONV is KOCLU with only avalaible key KNUMV at databse level. So to fulfill your request system has to read the whole table to look for KNUMH in imported internal table...

Why are you performing this query on a counter field?

Regards,

Raymond