Database Reference
In-Depth Information
Figure 15-6. Parallel executed SQL statements are processed by several slave processes coordinated by a server process
called query coordinator
In a parallel scan like the one illustrated in Figure 15-6 , the work is distributed among the slave processes in units
of work called granules . Each slave process, at a given time, works on a single granule. If there are more granules than
slave processes, when a slave process has finished working on a granule, it will receive another one to work on until all
granules have been processed. The database engine can use two types of granules:
partition granule is a whole partition or subpartition. Obviously, this type of granule can be
used only with partitioned segments.
A
block range granule is a range of blocks from a segment dynamically defined at runtime
(not at parse time).
A
For a parallel scan of an external table, granules are defined as pieces of an external file (the default size is
10 megabytes). So it's not necessary to have several external files to allow parallel access.
Note
Because the definition of partition granules is static (only the number, because of partition pruning, can change),
block range granules tend to be used most of the time. Their main advantage is that they allow, in most situations,
an even distribution of the work to the slave processes. In fact, with partition granules, the distribution of the work is
highly dependent not only on the ratio of the number of partitions to the number of slave processes but also on the
amount of data stored in each partition. Assume that every partition contains approximately the same amount of
data. In that case, for a good distribution of the work, the number of partitions should be a multiple of the number of
slave processes. If work isn't evenly distributed, some of the slave processes could work much more than others, and
therefore, this could lead to a longer response time. As a result, the overall efficiency of the parallel execution might be
jeopardized.
 
 
Search WWH ::




Custom Search