Is there a way to force the use of an index for a select statement in ABAP?
Is it possible ? Maybe with EXEC SQL . . .
Here find a trace
SELECT STATEMENT ( Estimated Costs = 28.747 , Estimated #Rows = 9 )
5 2 TABLE ACCESS BY INDEX ROWID EDIDC
( Estim. Costs = 28.747 , Estim. #Rows = 9 )
1 INDEX RANGE scan EDIDC~3
( Estim. Costs = 1.207 , Estim. #Rows = 269.667 )
As we can see sql optimizer choose index 3 but I though index 1 is better....
regards,