Skip to Content

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

Table scan better than index usage?


I have a problem with the following query:

SELECT header."CHANGED_BY",header."CHANGED_DATE",header."CLOSED_HEAD",header."CREATED_BY",header."CREATED_DATE",header."CREATE_IND",header."




FROM M48HEADER header,M49REQPOS item,M125TEXT mattext,M123MATERIAL matkl,M202TEXT servicetxt

WHERE ((((header."SYNCKEY_MMW" = item."PSYNCKEY") AND ((header."MATERIAL" = mattext."MATERIAL"(+)) AND (UPPER

(mattext."SPRAS") LIKE UPPER('de')ESCAPE'\') ) ) AND (header."MATERIAL" = matkl."MATERIAL"()) ) AND (header."SERVICE" = servicetxt."ASNUM"()) )


The interesting Indexes are set on header.SYNCKEY_MMW and on item.PSYNCKEY. When I use EXPLAIN it says that the header-index is used but

the item-index is not used and thats my problem: why does it not use this index? This index is high selective. Maybe the reason for this strategy is that this query

fetch <u>all</u> entries of table "item". Am I right or is there another reason?

Please help me!

Thx and kind regards,


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