Forum Stats

  • 3,758,423 Users
  • 2,251,387 Discussions


Are the rules for setting Parallelism the same to DDL statements as it is for DML statements

rjsosi Member Posts: 217 Bronze Badge
edited Sep 17, 2021 3:19PM in SQL & PL/SQL


We're using Oracle 12c.

I'm going to be building a PK constraint with Parallel enabled:

Here is the set of statements:

-- Enabling constraint using parallelism
alter table table_name add constraint constraint_name primary key (col1, col2, col3)
using index
enable novalidate;
alter session force parallel ddl;
alter table table_name parallel 8;
alter table table_name modify constraint constraint_name validate;
alter table table_name noparallel;

How do I determine the number of parallel sessions I can request?

In the example above I just randomly put 8.

How can I calculate what to actually put?

What parameters am I using to base this calculation?