Hello
As table MSEG could be quite big it will be faster to create the index at Oracle level.
1) create the index at SAP level through SE11 (here we call it Z01)
2) create the index at Oracle level
- with parallelism (needs to be reset after creation). You could increase / lower the parallelism depending on number of available CPU
- without logging
- updating the statistics for MSEG.
create index "SAPSR3"."MSEG~Z01" on "SAPSR3"."MSEG" ("MANDT", "EBELN", "BWART", "MATNR") tablespace "PSAPSR3" online parallel (degree 5) nologging;
alter index "SAPSR3"."MSEG~Z01" noparallel;
exec DBMS_STATS.GATHER_TABLE_STATS ('SAPSR3', 'MSEG', cascade=>TRUE, degree=>5);
How can I create an index?
Indexes should generally be created using SAP tools (in other words, transactions SE11 and SE14, transports) in the SAP environment.
If required, you can also create an index at Oracle level using the command CREATE INDEX. Here, additional options such as PARALLEL, NOLOGGING or ONLINE are possible.
Best regards