You can use the PARALLEL
hint to force parallelism. It takes an optional parameter: the DOP at which the statement should run. In addition, the NO_PARALLEL
hint overrides a PARALLEL
parameter in the DDL that created or altered the table.The following example illustrates forcing the statement to be executed in parallel:
SELECT /*+parallel */ last_name, department_name FROM employees e, departments d WHERE e.department_id=d.d.department_id;
The following example illustrates forcing the statement to be executed in parallel with a degree of 10:
SELECT /*+ parallel(10) */ last_name, department_name FROM employees e, departments d WHERE e.department_id=d.department_id;
The following example illustrates forcing the statement to be executed serially:
SELECT /*+ no_parallel */ last_name, department_name FROM employees e, departments d WHERE e.department_id=d.department_id;
The following example illustrates computing the DOP the statement should use:
SELECT /*+ parallel(auto) */ last_name, department_name FROM employees e, departments d WHERE e.department_id=d.department_id;
The following example forces the statement to use Oracle Database 11g Release 1 (11.1) behavior:
SELECT /*+ parallel(manual) */ last_name, department_name FROM employees e, departments d WHERE e.department_id=d.department_id;