We have an application where we rebuild indexes. The underlying table is having 25 partitions and there are 8 indexes on each partition. This effectively means that script has 200 indexes to re-build. The code which we are using is-
ALTER INDEX <Index Name> NOLOGGING;
ALTER INDEX <Index Name> REBUILD PARTITION TB_1538418432_425 PARALLEL 5;
ALTER INDEX <Index Name> LOGGING;
(Done for all 200 indexes sequentially)
The above script is taking around 5-6 hours to complete. The average partition size is around 3.5-4 GB.
Could someone have a look and suggest improving the performance of above Index rebuilding process.