Chapter 13. Parallel Execution in OPS

Parallel execution (discussed in Chapter 3) works in both OPS and non-OPS environments. In OPS environments, you can exploit the processing power of all of the available nodes to parallelize SQL operations.

How Parallel Execution Works with OPS

In a parallel execution environment, Oracle breaks down a SQL statement into several smaller tasks and assigns these tasks to multiple parallel slave processes. The slave processes then execute their tasks concurrently. Oracle Parallel Server extends this feature by executing parallel slave processes on multiple nodes of the parallel server.

Let’s look at an example of a four-node parallel server database, when a user issues the following query:

SELECT /*+ PARALLEL (orders, 2, 2) */
FROM orders;

This statement includes a PARALLEL hint specifying DEGREE 2 and INSTANCES 2. Oracle will divide the work of executing this query between two instances and will use two slave processes on each instance to do the work, as illustrated in Figure 13.1.

Parallel execution in an OPS environment

Figure 13-1. Parallel execution in an OPS environment

We mentioned in Chapter 3 that the degree of parallelism could be specified either through a hint or in the table/index definition. The degree of parallelism specification consists of two components: DEGREE and INSTANCES. The INSTANCES component controls the number of instances that will be used to execute the ...

Get Oracle Parallel Processing now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.