Parent and child cursors, bind variables and library cache
727211Feb 24 2011 — edited Feb 24 2011I was going through the documentations to understand the difference between parent cursors and child cursors. Surprisingly, there is not too much help for this. I could manage to collect the following info on it
For each SQL statement the library cache contains a "parent" cursor for the text of the SQL statement. The parent cursor is comprised of a "handle" that can be looked up by hash value via the library cache hash table, and an "object" that contains pointers to each of its "child" cursors. Each child cursor is also comprised of a handle and an object. The child object is comprised of two heaps numbered 0 and 6. Heap 0 contains all the identifying information for a particular version of the SQL statement and heap 6 contains the execution plan. This distinction between parent and child cursors is maintained even when there is only one version of each SQL statement.
Lets say that 2 DMLs were fired with the same set of bind variables(name of the variables were same but the value was different. The only difference between the 2 DMLs was the value of the bind variable) and under similar load conditions.
Would these 2 DML's be a the 2 child cursors of a single parent cursors.
Please point me to a detail documentation on the subject if my question is too elementary
Regards,
Vishal