Parallel Server   «Prev 

How do I enable Parallel DML in Oracle

To enable Parallel DML in Oracle, you will need to do the following:
  1. Set the PARALLEL_DEGREE_POLICY parameter to AUTO: This will allow Oracle to automatically determine the degree of parallelism for DML statements based on the available resources and workload. You can set this parameter using the following SQL statement:
    ALTER SYSTEM SET PARALLEL_DEGREE_POLICY=AUTO;
    
  2. Set the PARALLEL_MIN_PERCENT parameter to a non-zero value: This will specify the minimum percentage of available parallel execution servers that must be used for a DML statement to be executed in parallel. You can set this parameter using the following SQL statement:
    ALTER SYSTEM SET PARALLEL_MIN_PERCENT=50;
    
  3. Set the PARALLEL_MIN_SERVERS parameter to a non-zero value: This will specify the minimum number of parallel execution servers that must be used for a DML statement to be executed in parallel. You can set this parameter using the following SQL statement:
    ALTER SYSTEM SET PARALLEL_MIN_SERVERS=2;
    
  4. Set the PARALLEL_MAX_SERVERS parameter to a non-zero value: This will specify the maximum number of parallel execution servers that can be used for a DML statement. You can set this parameter using the following SQL statement:
    ALTER SYSTEM SET PARALLEL_MAX_SERVERS=4;
    
  5. Enable parallel DML for the table or partition: To enable parallel DML for a specific table or partition, you will need to use the PARALLEL clause in the CREATE TABLE or ALTER TABLE statement. For example:
    CREATE TABLE my_table (id NUMBER) PARALLEL;
    

Enable Parallel DML

Data Manipulation Language
Data Manipulation Language

Location 1 This command tells Oracle8i to consider all transactions following the command for parallel execution. Use this command, or use hints (see below) to enable parallel execution of specific commands.
Location 2 The table that is modified must be a partitioned table to use parallel execution. The syntax is identical to non-parallel DDL.
Location 3 In general, you should execute only one parallel execution command per transaction - issue a commit between transactions.
Location 4 A parallel UPDATE command uses many more locks than a non-parallel (serial) UPDATE command.
Location 5 This hint tells Oracle8i to use parallel execution of the command with a degree of parallelism set to five. There are many other hints you can use to customize parallel execution, but this is the main one.

Oracle Database Administration