parallelism
DESCRIPTION
Oracle parallelismTRANSCRIPT
http://www.dbsnaps.com/oracle/parallel-new-features-in-oracle-11gr2/Oracle 11gR2 brings us new features related to parallelism.The new features are controlled by the PARALLEL_DEGREE_POLICY initialization parameter. Learn how to use these new features to leverage your needs.Automatic Parallel DegreeWhen PARALLEL_DEGREE_POLICY is set to AUTO, automatic parallel degree is enabled. Oracle will evaluate the execution time of the statement, and if it exceeds the value of PARALLEL_MIN_TIME_THRESHOLD parameter (10 seconds by default) Oracle will calculate an automatic degree of parallelism (DOP) for this statement.Oracle calculates the DOP based on the statement requirements and the load on the server. The DOP can be limited by the parameter PARALLEL_DEGREE_LIMIT: CPU (default) will set the maximum DOP to the value of PARALLEL_THREADS_PER_CPU * CPU_COUNT * # of instances. IO - will limit the DOP according to the I/O of the system (available only after running DBMS_RESOURCE_MANAGER.CALIBRATE_IO). Integer value will limit the DOP to this integer.When PARALLEL_DEGREE_POLICY is set to LIMITED, Oracle will automatically determine the DOP for the statements. However, statements that are not specified to run in parallel, will run in serial.Statement QueuingWhen a statement is executed, Oracle determines the DOP for this statement. If creating the calculated number of parallel processes will cause the total number of active parallel processes in the system to exceed the PARALLEL_SERVERS_TARGET, this statement will be queued.The queue of statements is based on the simple first in first out mechanism. Once there are enough parallel processes available, the statement will start executing.Using resource manager, we can set priority in the statement queue, timeout for statements and manage the amount of parallel processes for statements.In Memory Parallel ExecutionWhen running a parallel operation, the server process is reading the data from the file using direct operation into its PGA. The data blocks are not cached in the SGA and are not read from it. The in memory parallel execution feature enables the server processes to load the blocks to the SGA and read them from the SGA.If the object is too large to fit in the buffer cache, Oracle will still use direct read.Disable Automatic Parallel FeaturesEnabling and disabling the automatic parallel features is made using the PARALLEL_DEGREE_POLICY parameter: AUTO all of the above features are enabled. LIMITED in memory parallel execution and statement queuing will be disabled, the automatic DOP will be enabled only for queries that were set to run in parallel. MANUAL disable all the automatic parallel features and revert parallel behavior to pre-11gR2
SQL> show parameter parallel
NAME TYPE VALUE------------------------------------ ----------- ------------------------------fast_start_parallel_rollback string LOWparallel_adaptive_multi_user boolean TRUEparallel_automatic_tuning boolean FALSEparallel_degree_limit string CPUparallel_degree_policy string MANUALparallel_execution_message_size integer 16384parallel_force_local boolean FALSEparallel_instance_group stringparallel_io_cap_enabled boolean FALSEparallel_max_servers integer 20 (CPU*threads*10= 12*2*10=240)parallel_min_percent integer 0parallel_min_servers integer 0parallel_min_time_threshold string AUTO (=10 secs)parallel_server boolean FALSEparallel_server_instances integer 1parallel_servers_targetinteger 8 (cannot exceed 75% of parallel_max_servers)parallel_threads_per_cpu integer 2recovery_parallelism integer 0
Using Parallel Execution (Doc ID 203238.1) says PARALLEL_MAX_SERVERSMaximum slaves possible per instance. A value of 0 means no parallel query.
To check the last query run in the session used DOP run:select * from v$pq_sesstat;
http://uhesse.com/2011/10/12/auto-dop-differences-of-parallel_degree_policyautolimited/
http://uhesse.com/2009/11/24/automatic-dop-in-11gr2/
Relevant Parallel Execution INIT.ora Parameters (Doc ID 201799.1)