I am trying to debug a complex query. This problem involves parallel query.
Using the SQL Window I attempted to modify the session by issuing commands such as
-- toggle to enable parallel
alter session force parallel query parallel 8;
-- and then toggle to disable parallel
alter session disable parallel query;
After issuing the above commands then I attempted to use the Explain Plan (F5) feature on the questionable SQL statement. The plans displayed never show the parallel version. When I workaround this by putting a hint directly in the SQL, the plan does display properly as a parallel plan.
Can you explain why the ALTER SESSION command appears to be executed but the subsequent EXPLAIN PLAN shows no evidence that the ALTER SESSION was executed?
I need to know how PL/SQL Developer works w.r.t. the SQL Window in order to figure out how to debug. If I ALTER SESSION I would like to see results that reflect such commands.
It almost seems as if the ALTER SESSION was executed in some alternate spawned off session and not within the session of the SQL Window that I was operating within.
Or alternatively it might be that the EXPLAIN PLAN itself is executed in a different session.
If either of these scenarios are true then how could one do things like ALTER SESSION and then observe the effects of such changes on the EXPLAIN PLAN results?
Thanks, BP
Using the SQL Window I attempted to modify the session by issuing commands such as
-- toggle to enable parallel
alter session force parallel query parallel 8;
-- and then toggle to disable parallel
alter session disable parallel query;
After issuing the above commands then I attempted to use the Explain Plan (F5) feature on the questionable SQL statement. The plans displayed never show the parallel version. When I workaround this by putting a hint directly in the SQL, the plan does display properly as a parallel plan.
Can you explain why the ALTER SESSION command appears to be executed but the subsequent EXPLAIN PLAN shows no evidence that the ALTER SESSION was executed?
I need to know how PL/SQL Developer works w.r.t. the SQL Window in order to figure out how to debug. If I ALTER SESSION I would like to see results that reflect such commands.
It almost seems as if the ALTER SESSION was executed in some alternate spawned off session and not within the session of the SQL Window that I was operating within.
Or alternatively it might be that the EXPLAIN PLAN itself is executed in a different session.
If either of these scenarios are true then how could one do things like ALTER SESSION and then observe the effects of such changes on the EXPLAIN PLAN results?
Thanks, BP