Database Reference
In-Depth Information
Parallel Query
Parallel query allows a single SQL
SELECT
statement to be divided into many smaller queries, with each component
query being run concurrently, and then the results from each combined to provide the final answer. For example,
consider the following query:
EODA@ORA12CR1> select count(status) from big_table;
Using parallel query, this query could use some number of parallel sessions, break the
BIG_TABLE
into small,
nonoverlapping slices, and then ask each parallel session to read the table and count its section of rows. The parallel
query coordinator for this session would then receive each of the aggregated counts from the individual parallel
sessions and further aggregate them, returning the final answer to the client application. Graphically it might look like
Figure
14-1
.
Figure 14-1.
Parallel select count (status) depiction
■
there is not a 1-1 mapping between processes and files as Figure
14-1
depicts. in fact, all of the data for
BIG_TABLE
could have been in a single file, processed by four parallel processes. or, there could have been two files
processed by the four, or any number of files in general.
Note