分类: Oracle
2013-04-23 17:20:10
In
10g, parallel execution in RAC instances is controlled with two
initialization parameters: INSTANCE_GROUPS and PARALLEL_INSTANCE_GROUP.
Both must be used together in 10g.
INSTANCE_GROUPS can have multiple values but it is static;
PARALLEL_INSTANCE_GROUP can be modified dynamically at the system level
and can also be set at the session level.
In 10g, in order for parallel execution to occur in a session where you
have PARALLEL_INSTANCE_GROUP set, the value for PARALLEL_INSTANCE_GROUP
has to be found in the list of groups specified by INSTANCE_GROUPS for
that instance.
For example, a 3-node RAC in 10gR2 might have the following settings in the spfile:
These settings mean that executions starting on any node will only run on that node.
Here is another way to use the same instance groups to achieve different results:
You can also set parallel_instance_group dynamically in the session.
For example, suppose that you connected to MYRAC1, and the spfile has the first set of settings above:
You can set parallel_instance_groups dynamically in your session:
Now, queries started in your session will run on all 3 of the nodes.