2015 Jun 19 3:04 PM
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
Why you are querying via KNUMH? KONV is cluster table. Only good way to select from it via KNUMV.
R
2015 Jun 19 3:12 PM
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
2015 Jun 19 3:21 PM
Why you are querying via KNUMH? KONV is cluster table. Only good way to select from it via KNUMV.
R
2015 Jun 19 3:49 PM
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.
2015 Jun 21 5:45 AM
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.
2015 Jun 22 7:41 AM
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.
2015 Jun 22 7:50 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |