Little insight of child cursor part -1

Simple queries against demo schema HR under 10g database.

==============================================

SQL> select * from emp,dept where emp.ename=’SMITH’ and dept.deptno=emp.deptno;

EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO DEPTNO DNAME LOC
———- ———- ——— ———- ——— ———- ———- ———- ———- ————– ————-
7369 SMITH CLERK 7902 17-DEC-80 800 20 20 RESEARCH DALLAS

SQL> select * from emp,dept where emp.ename=’CLARK’ and dept.deptno=emp.deptno;

EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO DEPTNO DNAME LOC
———- ———- ——— ———- ——— ———- ———- ———- ———- ————– ————-
7782 CLARK MANAGER 7839 09-JUN-81 2450 10 10 ACCOUNTING NEW YORK

SQL> select * from emp,dept where emp.ename=’AMIT’ and dept.deptno=emp.deptno;

no rows selected

———————————————————————————————

Listing of child cursor attached to same parent cursor. Oracle creates child cursor for every set of bind variable pair. In that case I was changing ename with SMITH, CLARK, & AMIT. So every time oracle created one child cursor to hold bind variables. Oracle tries to prepare a different execution plan for

Read more of this post

Advertisements
Frits Hoogland Weblog

IT Technology; Oracle, linux, TCP/IP and other stuff I find interesting

Pierre blog

Pierre Forstmann Oracle Database blog

flashdba

Oracle databases, storage and the high-performance world of flash memory

Future Veterans

Ramblings about Oracle

Ranjeet Srivastava

Smile! You’re at the best blog ever

Kevin Closson's Blog: Platforms, Databases and Storage

Platform, Database and Storage Topics

Real Life Database / SQL Experiences : An Oracle Blog from Vivek Sharma

Being an Oracle Professional, I like to share all my Real Life Performance Tuning Challenges and Experiences. The Content and Views on this site are my own and not necessarily those of Oracle. While, I write on my real life experiences, the resolutions mentioned are solely mine. Comments / Criticisms are always a welcome.

OraStory

Dominic Brooks on Oracle Performance, Tuning, Data Quality & Sensible Design ... (Now with added Sets Appeal)

ASM Support Guy

Just Another Crazy Oracle DBA

Exadata Certification

Just Another Crazy Oracle DBA

Carlos Sierra's Tools and Tips

Tools and Tips for Oracle Performance and SQL Tuning

Sangram keshari's Oracle Blog

The Fusion Middleware Administration & Database Administration Blog

Amit Saraswat

Just Another Crazy Oracle DBA

Oracle Scratchpad

Just another Oracle weblog

The Tom Kyte Blog

Just Another Crazy Oracle DBA

Hemant's Oracle DBA Blog

Just Another Crazy Oracle DBA

Uwe Hesse

about Database Technology

Richard Foote's Oracle Blog

Focusing Specifically On Oracle Indexes, Database Administration and Some Great Music