the reason why it choses the wrong index is because the optimizer thinks that he will get less rows returned with it
Code:|* 3 | INDEX RANGE SCAN | VBAP_MATNR_IDX1 | 1251 | | 9 | 3 - access("VBAP"."MATNR"='000000000700203599') |* 3 | INDEX RANGE SCAN | VBAP_VBELN_IDX1 | 44 | | 3 | 3 - access("VBAP"."VBELN">='0022000000' AND "VBAP"."VBELN"<='0022999999')




Reply With Quote