Received: (qmail 21232 invoked from network); 2 Feb 2012 08:02:02 -0600
Received: from freelists-180.iquest.net (HELO turing.freelists.org) (206.53.239.180)
  by static-ip-85-25-126-90.inaddr.ip-pool.com with SMTP; 2 Feb 2012 08:01:54 -0600
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id C7E13E8C541;
 Thu,  2 Feb 2012 09:01:44 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org;
 s=turing; t=1328191304; bh=Yfsm8HktuUpf5LmYUO+V7NIH6XjVPW4M4QSWov1F
 lV8=; h=Message-ID:From:To:References:Subject:Date:MIME-Version:
	 Content-type:Content-Transfer-Encoding:Sender:Reply-To:List-help:
	 List-unsubscribe:List-Id:List-subscribe:List-owner:List-post:
	 List-archive; b=sK+ncfWvAgUeo2CQKYwIoFgGAVeFgVo9+LfryRnY4JnYCs9X1w
 1BpfgZSzLQ6VPhKjHaSJDzJmpPR7ZXHV3pUfZBIXcZL9pMmG2w0DKcqHTpspJnNSYZW
 zDQTvhoIb8vz3JY6xZwLZ2RNzlwlRsDyMcLP+93b9RtDDOHxZE+XHs=
X-Virus-Scanned: Debian amavisd-new at localhost.localdomain
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id QvPyClpa78hw; Thu,  2 Feb 2012 09:01:44 -0500 (EST)
Received: from turing.freelists.org (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 52CCDE8C3C9;
 Thu,  2 Feb 2012 09:01:01 -0500 (EST)
Received: with ECARTIS (v1.0.0; list oracle-l); Thu, 02 Feb 2012 08:57:49 -0500 (EST)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 262B1E8BF1E
 for <oracle-l@freelists.org>; Thu,  2 Feb 2012 08:57:49 -0500 (EST)
Authentication-Results: turing.freelists.org; dkim=pass (1024-bit key) header.i=@yahoo.com
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id yHXLhfrdS1Tp for <oracle-l@freelists.org>;
 Thu,  2 Feb 2012 08:57:49 -0500 (EST)
Received: from nm2.bt.bullet.mail.ird.yahoo.com (nm2.bt.bullet.mail.ird.yahoo.com [212.82.108.233])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with SMTP id 2730FE8BEE2
 for <oracle-l@freelists.org>; Thu,  2 Feb 2012 08:57:47 -0500 (EST)
Received: from [212.82.108.230] by nm2.bt.bullet.mail.ird.yahoo.com with NNFMP; 02 Feb 2012 13:57:46 -0000
Received: from [212.82.108.226] by tm3.bt.bullet.mail.ird.yahoo.com with NNFMP; 02 Feb 2012 13:57:46 -0000
Received: from [127.0.0.1] by omp1003.bt.mail.ird.yahoo.com with NNFMP; 02 Feb 2012 13:57:46 -0000
X-Yahoo-Newman-Id: 197214.70157.bm@omp1003.bt.mail.ird.yahoo.com
Received: (qmail 98950 invoked from network); 2 Feb 2012 13:57:45 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1328191065; bh=RNC0YPZgspOqd6l6uwphWJMgu/SqWH+LwHI5PU9vhvA=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Message-ID:From:To:References:Subject:Date:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Priority:X-MSMail-Priority:X-Mailer:X-MimeOLE; b=ge03Uy2QxDWmXPRMbWplkY6ON6LAM5zvlMRJc1GxyRQivxh+pMWtSetkwdvFizg8O+fMuZjJoRG7pDsshR15ptcnxgUco5atDK2StojnpzeyoaPez1beKBz+Bkc5A6023qIuZfSeeOWZRNyVDmEbSS2V2uveJQITlfRT4pmYNoE=
X-Yahoo-Newman-Property: ymail-3
X-YMail-OSG: wYL9tEAVM1lItcv1uAMImXls.giC.o84HgIWTvE8.dt.Duf
 _4Z2fLfAhi5VavsjNE3j69MoOwQSvX1UKJnKjRgdFwoE3jajw2fVTFT5ITz3
 wEgvilkUXCyZV4mMk_lNM8.8gOT2y19eGi4cDT2nvK66I9V9eQ3wocx6dloU
 _6zx3FJwOtfPwujqnh2iin5fC1eIoEm_Wz2.WN5YXqkT2oOEixX3cgyvvXBR
 M0B_IillKE3p1mspOvoli9DTribOrplZGAeCqrGlvbJupHyNj6jINSl4WV0F
 fWmiUWolmluxeEAN_mlnPr04iabXw9nc7aWd1JoUjI34gCDIKIl1.vioW2n0
 Iz.ZDi49D3yrP4HXBVCUvaavoFTfNdu1xp43cXNCPrNqhEyRRGUcdQ7hI11l
 t3eXmUOn26VLkfevOgPoZOglyxn.KMcNOWAJtUJXppMUyEkEaktV0zWc8m2h
 O3tlmr.jx1hxOQNwIkPJaHGakjU0Y3KorwVKCzwpqgj8FCjwnX_73b_..V4x
 Uswcb4AwJvvDTbA1xDicUNV2R1gUEhZOReBA3RrGcLlJQX51YLxSic5Jhbu7
 DdZAVf7lHhcbGRec2igUfL_z6gZxK1uDeARMSxBIVM4mhCuL6NnWGkaf1Rjs
 d4nROrqDIdHG.sDSPUni5vCQ-
X-Yahoo-SMTP: 4vWPFZSswBAs9FgodTSfpaeSlgxsILPLGEbCUJdD5X2Ag3l43R3FWMc-
Received: from Primary (jonathan@86.166.104.159 with login)
        by smtp818.mail.ukl.yahoo.com with SMTP; 02 Feb 2012 13:57:44 +0000 GMT
Message-ID: <3297D21A133141B1BB8AF4FEF931573E@Primary>
From: "Jonathan Lewis" <jonathan@jlcomp.demon.co.uk>
To: <oracle-l@freelists.org>
References: <OFA00B57EC.FFF00C5B-ON65257998.004A52CF-65257998.004AC1D6@ibsplc.com>
Subject: Re: Child Cursor and Plan
Date: Thu, 2 Feb 2012 13:58:11 -0000
MIME-Version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
X-archive-position: 41239
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: jonathan@jlcomp.demon.co.uk
Precedence: normal
Reply-To: jonathan@jlcomp.demon.co.uk
List-help: <mailto:ecartis@freelists.org?Subject=help>
List-unsubscribe: <oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-subscribe: <oracle-l-request@freelists.org?Subject=subscribe>
List-owner: <mailto:steve.adams@ixora.com.au>
List-post: <mailto:oracle-l@freelists.org>
List-archive: <http://www.freelists.org/archives/oracle-l>
X-list: oracle-l


Apart from a new 11.2 scalability option, things like adaptive cursor 
sharing and cardinality feedback, and anomalies caused by bugs, a new child 
cursor is generated when a session tries to use a statement that is in the 
library cache and finds that every child cursors for that statement already 
in the cache has a different optimizer environment from the session's 
optimizer environment. It is possible that different optimizer environments 
will, however, still produce the same execution plan.

A common example of changing the optimizer environment is to enable 
SQL_trace; other options include local changes to workarea_size_policy, 
sort_area_size, db_file_multiblock_read_count, and so on. If you check 
v$sql.optimizer_env_hash_value for the statements you may find that they 
differ.


Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com
Oracle Core (Apress 2011)
http://www.apress.com/9781430239543


----- Original Message ----- 
From: "Sreejith S Nair" <Sreejith.Sreekantan@ibsplc.com>
To: <oracle-l@freelists.org>
Sent: Thursday, February 02, 2012 1:36 PM
Subject: Child Cursor and Plan


Hi Friends,
Oracle 11.2.0.2 on Solaris 10.

From my understanding a child cursor is generated when a sql statement
will have multiple execution plans. Here is what I see in one of our
database

SYS> select sql_id,child_number,hash_value,PLAN_HASH_VALUE,CHILD_ADDRESS
from v$sql where sql_id='c8gnrhxma4tas';

SQL_ID        CHILD_NUMBER HASH_VALUE PLAN_HASH_VALUE CHILD_ADDRESS
------------- ------------ ---------- --------------- ----------------
c8gnrhxma4tas            0 1721918808      4024720576 00000004481E01A8
c8gnrhxma4tas            1 1721918808      4024720576 0000000456DEF070
c8gnrhxma4tas            2 1721918808      4024720576 0000000448F3C210
c8gnrhxma4tas            3 1721918808      4024720576 000000047CA5BD30
c8gnrhxma4tas            4 1721918808      4024720576 0000000448476B88
c8gnrhxma4tas            5 1721918808      4024720576 000000047C217998
c8gnrhxma4tas            6 1721918808      4024720576 00000004483B0B78
c8gnrhxma4tas            7 1721918808      4024720576 000000047C3F9668

Here I see that CHILD_NUMBER and different CHILD_ADDRESS are generated for
same PLAN_HASH_VALUE. Can someone please give some light on what exactly
is a child cursor ?
This is what I got from Google. Could not find a proper definition in
documentation.May be I missed ?

The parent cursor contains the SQL statement text only, but no execution
plan.
Execution plans are found in child cursors. Child cursors are also called
versions.

With Regards,
Sreejith

--
Sreejith S Nair
Associate Systems Architect | AOS DBA Team
IBS Software Services Private Ltd.
2nd Floor, IBS Campus, Technopark Campus, Trivandrum - 695 581, Kerala,
India
((Direct) +91 471 661 4707 ) +91 808 648 5523
*sreejith.sreekantan@ibsplc.com
8 www.ibsplc.com





DISCLAIMER:

"The information in this e-mail and any attachment is intended only for
the person to whom it is addressed and may contain confidential and/or
privileged material. If you have received this e-mail in error, kindly
contact the sender and destroy all copies of the original communication.
IBS makes no warranty, express or implied, nor guarantees the accuracy,
adequacy or completeness of the information contained in this email or any
attachment and is not liable for any errors, defects, omissions, viruses
or for resultant loss or damage, if any, direct or indirect."






--
http://www.freelists.org/webpage/oracle-l




-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1913 / Virus Database: 2112/4780 - Release Date: 02/01/12


--
http://www.freelists.org/webpage/oracle-l


