I am trying to put all the info in one screenshot here to capture everything in one place. Pls excuse.
Problem Situation: Our production SAP system is on MSSQL. I hope you are aware that BDCP2 contains change pointers Processed/Unprocessed. While trying to find change pointers tobe executed thru idoc, system utilized BDCP2 table. When searching for unprocessed, it takes Estimated I/O of 12.xxx (as shows in the picture). Here is the SQL statement.
SELECT "MANDT" ,"MESTYPE" AS c ,"CPIDENT" AS c ,"PROCESS" AS c ,"TABNAME" AS c ,
"TABKEY" AS c ,"FLDNAME" AS c ,"CRETIME" AS c ,"ACTTIME" AS c ,"USRNAME" AS c ,
"CDOBJCL" AS c ,"CDOBJID" AS c ,"CDCHGNO" AS c ,"CDCHGID" AS c
FROM "BDCP2"
WHERE "MANDT" = @P1 AND "MESTYPE" = @P2 AND "PROCESS" = @P3
ORDER BY "MANDT" ,"CPIDENT"
/* R3:SAPLBD01:2047 T:BDCP2 M:010 */
In this where clause, fields MANDT,MESTYPE & PROCESS are in the order. Based on this it should be using index BDCP2~001. But system is using BDCP2~0 index.
Index BDCP2~0 which has fields
MANDT,
MESTYPE &
CPIDENT.
But there is another index BDCP2~001 that has fields
MANDT,
MESTYPE
PROCESS,
CRETIME &
CPIDENT
It would be more efficient if system uses BDCP2~001 as there are very few records that needs tobe processed in the system and it would reduce estimated IO cost. Is there a way to get this done. Please note that this is standard SAP program.
Thanks and Regards,
Giridhara Tadikonda.