Parallel execution of SQL statements using Parallel hint in Oracle

Few of the queries takes more time to run in oracle due to large volume of data.We can enable the DOP(Degree of parallelism) by using the parallel hint option in the query and it will return the output quickly for the large volume of data.

Degree of Parallelism:

The number of parallel execution servers associated with a single operation is known as the degree of parallelism (DOP). The parallel execution is designed to effectively use multiple CPU’s. It is a kind of Oracle Database parallel execution framework which enables us to either explicitly choose a specific degree of parallelism or to rely on the Oracle database to automatically control it.

Syntax of parallel execution

SELECT /*+ parallel(<tablename>,<number of parallel execution>) */ *
FROM tablename

Example

SELECT /*+ parallel(e,2) */ *
FROM Employee e
ORDER BY emp_first_name, emp_last_name, emp_year_of_birth