Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

On what basis does the optimiser select the index

Hi,

The following select statement is causing a performance issue.

SELECT SINGLE belnr FROM bkpf INTO bkpf-belnr

WHERE bukrs = t_input_invoice-detenteur_compte_banc

AND gjahr = w_gjahr

AND blart = 'ZR'

AND bstat IN r_bstat

AND xblnr LIKE w_bktxt.

When I checked in ST04 transaction,the optimiser is selecting BKPF3 index having fields bukrs,bstat and blart which are present in the where condition of the select statement.But there is also one more index BKPF1 having fields bukrs,bstat and xblnr which are also present in the where condition of the select statement.

On what basis did the optimiser select BKPF~3 index?

Can anyone explain.

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question