O'Reilly logo

Oracle Parallel Processing by Sanjay Mishra, Tushar Mahapatra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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) */
COUNT(*)
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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required