The relations between sessions, DOP and sets of parallel execution servers

oracleoracle-12cparallelismperformanceperformance-tuning

From How Parallel Execution Works:

The number of parallel execution servers in one set is the degree of parallelism (DOP)

What is the meaning of "one set" in the document? Does it have a relationship with user session? My understanding is that one session has only one set, two sessions have two sets, and the total session's execution servers is limited by parallel_servers_target. Is that correct?

Best Answer

That quote is definitely unclear. I interpret "one set" to be one set of operations, which is also called a data flow operation in the context of a parallel plan. One parallel query may have more than one data flow operation, so one session may contain more than one set. I recommend reading Understanding Parallel Execution - Part 1:

The question is often asked: "How parallel?" For example, what actual Parallel Degree was used for the execution of that statement last night? The question in fact is not that simple to answer since it lacks some precision. First of all there is a so called Degree Of Parallelism (DOP) that is determined by the optimizer when generating the execution plan. A recent overview of how this DOP is determined can be found here, on the The Data Warehouse Insider blog, including the latest Automatic Degree Of Parallelism (Auto DOP) feature introduced in Oracle Database 11.2.

Then there is the problem that it is possible that the optimizer generates multiple so-called "Data Flow Operations (DFO)" per execution plan, and that each DFO has its own, possibly different, DOP.

At execution time for each DFO there can be up to two Parallel Slave Sets active at the same time, each Parallel Slave Set consisting of DOP number of Parallel Slaves.

So for a single SQL statement executed in parallel, there is potentially no single answer to the question "How parallel?" because the optimizer might de-compose it into several DFOs, each having its own DOP.