SQL Performance (MOSC)

MOSC Banner

Only using 1 parallel DML thread when using INSERT with APPEND ENABLE_PARALLEL_DML PARALLEL(8)

edited February 2020 in SQL Performance (MOSC) 2 commentsAnswered ✓

Inserting into a table (interval partitioned) in parallel and enabling parallel DML -- does not write in parallel the first time, but does every successive time unless destination table is recreated.

Create destination table:

create table metrics_out

(

"_TIMESTAMP_EXTRACT_KEY" NUMBER(*,0),

RECORD_ID NUMBER(18,0),

LINE NUMBER(38,0),

. . .

)

PARTITION BY RANGE ("_TIMESTAMP_EXTRACT_KEY") INTERVAL (1)

(PARTITION "SYS_P9999"  VALUES LESS THAN (4) SEGMENT CREATION IMMEDIATE) ;

INSERT into destination table with parallel DML enabled:

insert /*+ enable_parallel_dml append parallel(8) monitor */

   into metrics_out

   select 6,

    RECORD_ID,

    LINE,

. . .

from stage.metrics;

Only using 1 parallel writer, of course very slow.

After deleting all rows in destination table or truncating it, then doing an INSERT again, it's

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center