Professional Documents
Culture Documents
1)
***Checked for relevance on 30-April-2010***
PURPOSE
-------
This article explains what you will get if you use sql_trace or
the 10046 event to trace a parallel running query.
Support Analysts
Query coordinator(QC) parses the query and determines the degree of parallelism. QC
controls the query and sends instructions to the PQ slaves. QC produces the
final output to the user. The QC splits this SQL statement and makes new
'smaller' SQL statement from the original one and sends this to the
query slaves.
This means the original SQL command from the user will not be exectued. We
only execute the new small parts. This changes in 10g where all slaves
work on the original SQL command and we not create new smaller SQL commands
for the slaves.
It is possible to have more than one slave sets depending on the complexity of
the query. Simple query like 'select * from emp' run in prallel will use
one slave set - just to scan the table. Whereas query with sorting operations
will have two slave sets.
Enabling 10046 would create a trace file for each slave and the QC.
In 8i and maybe in early 9i version you do not see any trace file.
This is caused by a internal bug.
An example
----------
The last three statements will be executed, but not the original one.
In 9i Release 2 you can see the slave information when you explian a statement
and then display the execution plan with the command:
In older version you can see the Slave SQL statement when you use autotrace.