Hi,
I am working with an Oracle RDBMS 12vR1.
I need to reload huge amount of data in a table.
Doing this, I first drop the constraints and the indexes, load the table (insert append), and then re-create the indexes and the constraints.
But re-enabling constraints and re-creating indexes can take a significant amount of time because each instruction is executed sequentially.
So, I proceed the following way:
1.1) drop the constraints
1.2) drop the indexes
1.3) set the session for parallel execution:
ALTER SESSION FORCE PARALLEL QUERY PARALLEL 4;
ALTER SESSION FORCE PARALLEL DDL PARALLEL 4;
1.4) re-create the indexes as:
CREATE UNIQUE INDEX "TIGER"."PK_SALES_ID" ON "TIGER"."SALES" ("ID")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE
STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST
GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "TIGER_D";
and so on...
1.4) re-create the constraints as:
ALTER TABLE "TIGER"."SALES" ADD CONSTRAINT "CC_COMM" CHECK (COMM < 1500) ENABLE;
and so on...
But I do not observe a parallel execution. It still to be sequentially executed (the total execution time is about the same than if I do use the parallel instructions).
Does someone know if this is the correct way to force a parallel execution?
Thanks and Regards