GotoDBA Database Tuning,Did You Know,Troubleshooting Did You Know #35 – New Child Cursor Creation Reason

Did You Know #35 – New Child Cursor Creation Reason

In many cases we see a new child cursor for existing SQL. You can see the children and their information in V$SQL (where CHILD_NUMBER identifies the child). To see the child execution plan, use the DBMS_XPLAN package:

SELECT * FROM
TABLE(DBMS_XPLAN.DISPLAY_CURSOR('<SQL_ID>',<CHILD_NUMBER>));

However, sometimes we want to know why Oracle has created the new child. This information is available in the V$SQL_SHARED_CURSOR view. You will see there the SQL_ID, the CHILD_NUMBER (as well as other things) and a list of quite a few reasons for creating the new child (64 in 19c). Each “reason” column contains Y or N. The ones contain Y are the reason Oracle created this child. Check which column these are and find the reason.

For a complete list of columns along with their meaning, check this page on the documentation (this is for 19c).

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post