, ,

This something happened yesterday and seems quite interesting. One of our customiZed ABAP program has a ‘Select single inside it’ which is getting converted as ‘Select /* First row…’ in the backend Oracle, but fetching the not the First but the second row…..

This came to my notice, as ABAP group lead requested me to rebuild all the 5 index in the underlying table, got surprised and after a discussion the above fact is revealed.

I have prescribed statistics generation using DBMS_STATS and also use ‘ Select UP TO 1 ROWS’. With a hope that the problem will be sorted out. Let see whether they implement the same get a solution or not…..

Yet to search and find any SAP relevant notes inside it……..

Some good relevant link I already explored is
1. Difference between select single and up to 1 row

2. Understanding optimizer hints.