<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ora-solutions.net - Martin Decker &#187; MetaLink</title>
	<atom:link href="http://www.ora-solutions.net/web/category/oracle-database/metalink/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ora-solutions.net/web</link>
	<description>Indepented Oracle consultant</description>
	<lastBuildDate>Wed, 14 Jul 2010 17:59:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Oracle Clusterware / ASM 11.1.0.7: ASM Instance crash</title>
		<link>http://www.ora-solutions.net/web/2009/10/28/oracle-clusterware-asm-11-1-0-7-asm-instance-crash/</link>
		<comments>http://www.ora-solutions.net/web/2009/10/28/oracle-clusterware-asm-11-1-0-7-asm-instance-crash/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 15:27:00 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[11g]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MetaLink]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=779</guid>
		<description><![CDATA[During a 11gR1 Clusterware installation for a Single Instance Failover Cluster at a customer site, I have experienced an interesting behaviour, which was caused by an Oracle Bug.
The environment was:

2 Node Oracle Clusterware 11.1.0.7 Cluster on Linux x86_64 using latest Recommended Patches as of October 19th. (pre PSU 11.1.0.7.1)
Clusterware installed as unix user crs
ASM installed [...]]]></description>
			<content:encoded><![CDATA[<p>During a 11gR1 Clusterware installation for a Single Instance Failover Cluster at a customer site, I have experienced an interesting behaviour, which was caused by an Oracle Bug.</p>
<p>The environment was:</p>
<ul>
<li>2 Node Oracle Clusterware 11.1.0.7 Cluster on Linux x86_64 using latest Recommended Patches as of October 19th. (pre PSU 11.1.0.7.1)</li>
<li>Clusterware installed as unix user crs</li>
<li>ASM installed as unix user oracle</li>
</ul>
<p>The ASM instances could be started with SQL*Plus without any problems, but if the ASM instances were started by means of clusterware using srvctl (either from root, crs or oracle) the  ASM instances would crash at diskgroup mount with:</p>
<blockquote>
<pre>ORA-07445: exception encountered: core dump  [sskgds_find_rtn_hdr()+1171]
[SIGBUS] [ADDR:0x2AACD701342C] [PC:0x25799DF]
[Non-existent physical address] []</pre>
</blockquote>
<p>Oracle Support identified this behaviour as Bug 6952915, for which there are patches for Linux x86, x86_64 and Solaris Sparc64.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2009/10/28/oracle-clusterware-asm-11-1-0-7-asm-instance-crash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Patch Set Update (PSU) October 2009 released</title>
		<link>http://www.ora-solutions.net/web/2009/10/21/patch-set-update-psu-october-2009-released/</link>
		<comments>http://www.ora-solutions.net/web/2009/10/21/patch-set-update-psu-october-2009-released/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 17:15:20 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[11g]]></category>
		<category><![CDATA[MetaLink]]></category>
		<category><![CDATA[Oracle Database]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=773</guid>
		<description><![CDATA[Oracle has released the October 2009 Patch Set Update (PSU) which contains several interesting news:

first PSU, which is available for Grid Control 10.2.0.5
seperate PSU Patches for Clusterware (CRS)
Patch Set Updates are now released for ALL non-Windows platform whereas previous PSUs were released for special platforms (e.g. Linux Itanium) on request only.

More info can be found [...]]]></description>
			<content:encoded><![CDATA[<p>Oracle has released the October 2009 Patch Set Update (PSU) which contains several interesting news:</p>
<ul>
<li>first PSU, which is available for Grid Control 10.2.0.5</li>
<li>seperate PSU Patches for Clusterware (CRS)</li>
<li>Patch Set Updates are now released for ALL non-Windows platform whereas previous PSUs were released for special platforms (e.g. Linux Itanium) on request only.</li>
</ul>
<p>More info can be found in Metalink Note 854428.1.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2009/10/21/patch-set-update-psu-october-2009-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>High CPU Utilization &#8211; waits on cursor: pin S</title>
		<link>http://www.ora-solutions.net/web/2009/08/11/high-cpu-utilization-waits-on-cursor-pin-s/</link>
		<comments>http://www.ora-solutions.net/web/2009/08/11/high-cpu-utilization-waits-on-cursor-pin-s/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 05:42:14 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[MetaLink]]></category>
		<category><![CDATA[Oracle Database]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=736</guid>
		<description><![CDATA[I have recently encountered a problem at a customer site, where the database instances resource utilization was so high that the application did not work anymore. Version was 10.2.0.4 on Linux with Oracle Recommended Generic Patches installed.
Unfortunately, the customer decided to bounce the instance, so that there is no possibility for intensive diagnosis. However, ASH [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently encountered a problem at a customer site, where the database instances resource utilization was so high that the application did not work anymore. Version was 10.2.0.4 on Linux with Oracle Recommended Generic Patches installed.</p>
<p>Unfortunately, the customer decided to bounce the instance, so that there is no possibility for intensive diagnosis. However, ASH report shows that a dozen sessions either waited on Wait event &#8220;cursor: pin S&#8221; or were active (ON CPU) without any SQL_ID. An AWR Report  showed:</p>
<blockquote><pre>Top 5 Timed Events                                         Avg %Total
~~~~~~~~~~~~~~~~~~                                        wait   Call
Event                                 Waits    Time (s)   (ms)   Time Wait Class
------------------------------ ------------ ----------- ------ ------ ----------
cursor: pin S                   140,036,615      24,833      0 ######      Other
CPU time                                             19          72.9
log file sync                         8,767           8      1   30.2     Commit
log file parallel write               9,039           8      1   29.9 System I/O
control file parallel write           1,269           5      4   20.2 System I/O</pre>
</blockquote>
<p>Oracle Support confirmed that this is <strong>Bug 6904068 High CPU usage when there are &#8220;cursor: pin S&#8221; waits.</strong> We have filed a backport request for it, as there is no patch for our platform available yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2009/08/11/high-cpu-utilization-waits-on-cursor-pin-s/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle introduces Patch Set Updates (PSU) for 10.2.0.4 Database</title>
		<link>http://www.ora-solutions.net/web/2009/07/16/oracle-introduces-patch-set-updates-psu-for-10204-database/</link>
		<comments>http://www.ora-solutions.net/web/2009/07/16/oracle-introduces-patch-set-updates-psu-for-10204-database/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 12:58:39 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[MetaLink]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Oracle Database]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=713</guid>
		<description><![CDATA[On July 14th Oracle announced on MetaLink the release of a new patching strategy for the Oracle Database.
The new Patch Set Updates (PSU) will contain cumulative patches, which contain recommended bugfixes. They will be provided on a the same quarterly basis as the Critical Patch Update (CPU), therefore release months will be January, April, July [...]]]></description>
			<content:encoded><![CDATA[<p>On July 14th Oracle announced on MetaLink the release of a new patching strategy for the Oracle Database.</p>
<p>The new <strong>Patch Set Updates (PSU)</strong> will contain cumulative patches, which contain recommended bugfixes. They will be provided on a the same <strong>quarterly basis </strong>as the Critical Patch Update (CPU), therefore release months will be January, April, July and October. The Patch Set Update will be described in the release version. E.g. <strong>10.2.0.4.1</strong> will be the first Patch Set Update (PSU), 10.2.0.4.2 the second PSU etc.</p>
<p>As described in the release information, the 10.2.0.4.1 PSU Patch (Patch 8576156) contains all the recommended patch bundles up to July 2009 (Generic, CRS, RAC, Services, DataGuard) as well as the Critical Patch Update July 2009. Moreover 5 additional critical bugfixes are included. OPatch version 10.2.0.4.7 is required for installation of PSU 10.2.0.4.1 and the PSU is rolling installable on RAC environments without downtime.</p>
<p>Later PSU patches can be installed on either the base release or on top of any previous PSU. For example, PSU 10.2.0.4.3 can be installed on top of Base 10.2.0.4.0, PSU 10.2.0.4.1, PSU 10.2.4.0.2.</p>
<p>As already mentioned, the customer has the option to install security patches only by installing the quarterly Critical Patch Update or to install security plus non-security bugfixes by installint the Patch Set Update (PSU). As the PSU 10.2.0.4.1 already contains Critical Patch Update July 2009, the documentation states that future security patches are recommended to be installed not by CPU Patches but through PSU Patches.</p>
<p>Further information can be found in these MetaLink Notes:</p>
<p>854428.1 &#8211; Intro to Patch Set Updates (PSU)<br />
850471.1 &#8211; Oracle Announces First Patch Set Update For Oracle Database Release 10.2<br />
8576156.8 &#8211; Bug 8576156  10.2.0.4.1 Patch Set Update (PSU)<br />
854473.1 &#8211; Known Issues with this Patch Set Update 10.2.0.4.1</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2009/07/16/oracle-introduces-patch-set-updates-psu-for-10204-database/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Diagnosing &#8220;cursor: pin S wait on X&#8221;</title>
		<link>http://www.ora-solutions.net/web/2009/04/23/diagnosing-cursor-pin-s-wait-on-x/</link>
		<comments>http://www.ora-solutions.net/web/2009/04/23/diagnosing-cursor-pin-s-wait-on-x/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 10:23:49 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[MetaLink]]></category>
		<category><![CDATA[Oracle Database]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=642</guid>
		<description><![CDATA[I came across a metalink note (Note 786507.1) which describes a very short way to identify the blocker of a session waiting on mutex &#8220;cursor: pin S wait on X&#8221;. Previously, I thought it could only be analyzed with system state dumps, but the note describes that parameter P2RAW of wait event &#8220;cursor: pin S [...]]]></description>
			<content:encoded><![CDATA[<p>I came across a metalink note (Note 786507.1) which describes a very short way to identify the blocker of a session waiting on mutex &#8220;cursor: pin S wait on X&#8221;. Previously, I thought it could only be analyzed with system state dumps, but the note describes that parameter P2RAW of wait event &#8220;cursor: pin S wait on X&#8221; contains the blocking session id and the refcount. For 32bit environments the field contains 4 bytes (2 bytes for session id, 2 bytes for refcount). On 64 bit environments, the field contains 8 bytes (4 vs. 4).</p>
<blockquote><p>select  p2raw from v$session where event = &#8216;cursor: pin S wait on X&#8217;</p></blockquote>
<p>The first 2 or 4 bytes from p2raw have to be converted to dec and point to the blocking Session ID. (SID)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2009/04/23/diagnosing-cursor-pin-s-wait-on-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle RAC 10.2.0.4 bug when adding/dropping redo log groups</title>
		<link>http://www.ora-solutions.net/web/2009/04/23/oracle-rac-10204-bug-when-addingdropping-redo-log-groups/</link>
		<comments>http://www.ora-solutions.net/web/2009/04/23/oracle-rac-10204-bug-when-addingdropping-redo-log-groups/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 10:23:02 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[MetaLink]]></category>
		<category><![CDATA[Oracle Database]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=648</guid>
		<description><![CDATA[On the oracle-l list, there was a post about a nasty bug in Oracle RAC 10.2.0.4 which can cause LGWR errors, instance failures and redo log corruptions.
The bug occurs if you add/remove redo log groups on a cluster database, which has some of it´s instances shut down.
More information about this Bug, which is tracked with [...]]]></description>
			<content:encoded><![CDATA[<p>On the oracle-l list, there was a post about a nasty bug in Oracle RAC 10.2.0.4 which can cause LGWR errors, instance failures and redo log corruptions.</p>
<p>The bug occurs if you add/remove redo log groups on a cluster database, which has some of it´s instances shut down.</p>
<p>More information about this Bug, which is tracked with Bug ID 6786022 can be found on MetaLink. There is a patch for 10.2.0.4 and Linux x86-64 available.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2009/04/23/oracle-rac-10204-bug-when-addingdropping-redo-log-groups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASSM Problem with too low PCTFREE</title>
		<link>http://www.ora-solutions.net/web/2009/04/09/assm-problem-with-too-low-pctfree/</link>
		<comments>http://www.ora-solutions.net/web/2009/04/09/assm-problem-with-too-low-pctfree/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 19:40:22 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[11g]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[MetaLink]]></category>
		<category><![CDATA[Oracle Database]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=605</guid>
		<description><![CDATA[During the Hotsos Symposium 2009 Training Day, Jonathan Lewis presented a problem which appears even on current 10g/11g databases. What is especially interesting is how this issue can be diagnosed. I reproduced the problem in 11.1.0.7 and will provide the steps you can use to verify. The problem can be demonstrated best when comparing response [...]]]></description>
			<content:encoded><![CDATA[<p>During the Hotsos Symposium 2009 Training Day, Jonathan Lewis presented a problem which appears even on current 10g/11g databases. What is especially interesting is how this issue can be diagnosed. I reproduced the problem in 11.1.0.7 and will provide the steps you can use to verify. The problem can be demonstrated best when comparing response time of an update statement for 8k blocksize and 16k blocksize. </p>
<ul>
<strong>
<li>8k Blocksize</li>
<p></strong></p>

<div class="wp_syntax"><div class="code"><pre class="oracle11" style="font-family:monospace;">SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">DROP</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLE</span> t1_8k purge;
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">CREATE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLESPACE</span> DEMO8K datafile <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SIZE</span> 128M blocksize <span style="color: #cc66cc;">8192</span>;
&nbsp;
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLESPACE</span> created.
&nbsp;
Elapsed: 00:00:<span style="color: #cc66cc;">07.35</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">CREATE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLE</span> mdecker.t1_8k
<span style="color: #66cc66;">&#40;</span>n1 <span style="color: #993333; font-weight: bold; text-transform: uppercase;">NUMBER</span><span style="color: #66cc66;">,</span>
 n2 <span style="color: #993333; font-weight: bold; text-transform: uppercase;">NUMBER</span><span style="color: #66cc66;">&#41;</span>
 <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLESPACE</span> DEMO8K;
&nbsp;
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLE</span> created.
&nbsp;
Elapsed: 00:00:<span style="color: #cc66cc;">00.02</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">INSERT</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">INTO</span> t1_8k
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TRUNC</span><span style="color: #66cc66;">&#40;</span>dbms_random.<span style="color: #993333; font-weight: bold; text-transform: uppercase;">VALUE</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10000000</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">100000000</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> n1<span style="color: #66cc66;">,</span>
           <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TO_NUMBER</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold; text-transform: uppercase;">NULL</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">AS</span> n2
    <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> dual
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">CONNECT</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">BY</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">LEVEL</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">500000</span>
<span style="color: #66cc66;">/</span>
&nbsp;
&nbsp;
<span style="color: #cc66cc;">500000</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ROWS</span> created.
&nbsp;
Elapsed: 00:00:<span style="color: #cc66cc;">06.89</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">BEGIN</span> dbms_stats.gather_table_stats<span style="color: #66cc66;">&#40;</span>
        ownname <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">'MDECKER'</span><span style="color: #66cc66;">,</span>
        tabname <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">'T1_8K'</span><span style="color: #66cc66;">,</span>
        estimate_percent <span style="color: #66cc66;">=&gt;</span> <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span>;
<span style="color: #66cc66;">/</span>
&nbsp;
PL<span style="color: #66cc66;">/</span><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SQL</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">PROCEDURE</span> successfully completed.
&nbsp;
Elapsed: 00:00:<span style="color: #cc66cc;">02.13</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> num_rows<span style="color: #66cc66;">,</span>blocks <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> dba_tables <span style="color: #993333; font-weight: bold; text-transform: uppercase;">WHERE</span> table_name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'T1_8K'</span>;
&nbsp;
  NUM_ROWS     BLOCKS
<span style="color: #808080; font-style: italic;">---------- ----------</span>
    <span style="color: #cc66cc;">500000</span>        <span style="color: #cc66cc;">874</span>
&nbsp;
Elapsed: 00:00:<span style="color: #cc66cc;">00.15</span>
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">UPDATE</span> t1_8k <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SET</span> n2 <span style="color: #66cc66;">=</span> n1;
&nbsp;
<span style="color: #cc66cc;">500000</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ROWS</span> updated.
&nbsp;
Elapsed: 00:01:<span style="color: #cc66cc;">09.04</span>
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">COMMIT</span>;</pre></div></div>

<p><strong>
<li>16k Blocksize</li>
<p></strong></p>

<div class="wp_syntax"><div class="code"><pre class="oracle11" style="font-family:monospace;">SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">CREATE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLESPACE</span> DEMO16K datafile <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SIZE</span> 128M blocksize <span style="color: #cc66cc;">16384</span>;
&nbsp;
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLESPACE</span> created.
&nbsp;
Elapsed: 00:00:<span style="color: #cc66cc;">14.75</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">CREATE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLE</span> mdecker.t1_16k
<span style="color: #66cc66;">&#40;</span>n1 <span style="color: #993333; font-weight: bold; text-transform: uppercase;">NUMBER</span><span style="color: #66cc66;">,</span>
 n2 <span style="color: #993333; font-weight: bold; text-transform: uppercase;">NUMBER</span><span style="color: #66cc66;">&#41;</span>
 <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLESPACE</span> DEMO16K;
&nbsp;
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">TABLE</span> created.
&nbsp;
Elapsed: 00:00:<span style="color: #cc66cc;">00.03</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">INSERT</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">INTO</span> t1_16k
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TRUNC</span><span style="color: #66cc66;">&#40;</span>dbms_random.<span style="color: #993333; font-weight: bold; text-transform: uppercase;">VALUE</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10000000</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">100000000</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> n1<span style="color: #66cc66;">,</span>
           <span style="color: #993333; font-weight: bold; text-transform: uppercase;">TO_NUMBER</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold; text-transform: uppercase;">NULL</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">AS</span> n2
    <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> dual
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">CONNECT</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">BY</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">LEVEL</span> <span style="color: #66cc66;">&lt;=</span> <span style="color: #cc66cc;">500000</span>
<span style="color: #66cc66;">/</span>  
&nbsp;
&nbsp;
<span style="color: #cc66cc;">500000</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ROWS</span> created.
&nbsp;
Elapsed: 00:00:<span style="color: #cc66cc;">05.51</span>
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">BEGIN</span> dbms_stats.gather_table_stats<span style="color: #66cc66;">&#40;</span>
        ownname <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">'MDECKER'</span><span style="color: #66cc66;">,</span>
        tabname <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">'T1_16K'</span><span style="color: #66cc66;">,</span>
        estimate_percent <span style="color: #66cc66;">=&gt;</span> <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span>;
<span style="color: #66cc66;">/</span>  
&nbsp;
PL<span style="color: #66cc66;">/</span><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SQL</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">PROCEDURE</span> successfully completed.
&nbsp;
Elapsed: 00:00:<span style="color: #cc66cc;">01.78</span>
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> num_rows<span style="color: #66cc66;">,</span>blocks <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> dba_tables <span style="color: #993333; font-weight: bold; text-transform: uppercase;">WHERE</span> table_name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'T1_16K'</span>;
&nbsp;
  NUM_ROWS     BLOCKS
<span style="color: #808080; font-style: italic;">---------- ----------</span>
    <span style="color: #cc66cc;">500000</span>        <span style="color: #cc66cc;">436</span>
&nbsp;
Elapsed: 00:00:<span style="color: #cc66cc;">00.07</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>  <span style="color: #993333; font-weight: bold; text-transform: uppercase;">UPDATE</span> t1_16k <span style="color: #993333; font-weight: bold; text-transform: uppercase;">SET</span> n2 <span style="color: #66cc66;">=</span> n1;
&nbsp;
<span style="color: #cc66cc;">500000</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ROWS</span> updated.
&nbsp;
Elapsed: 00:<span style="color: #cc66cc;">20</span>:<span style="color: #cc66cc;">20.89</span></pre></div></div>

<p>As you can see, the update statement for the 8k blocksize table took around 69 seconds whereas the same update for the table in the 16k tablespace took more than 20 minutes. When executing oradebug short_stack, you can see that for the 16k update, the stacktrace is similar for many executions. So, a lot of time is spent in the kernel functions ktspfsrch() and ktspscan_bmb().</p>
<p><code><br />
SQL&gt; oradebug setospid 23668<br />
Oracle pid: 18, Unix process pid: 23668, image: oracle@ora-vm1.intra (TNS V1-V3)<br />
SQL&gt; oradebug short_stack<br />
.....ktspfsrch()+559&lt;-ktspscan_bmb()+315 .....<br />
SQL&gt; oradebug short_stack<br />
.....ktspfsrch()+559&lt;-ktspscan_bmb()+315 .....<br />
SQL&gt; oradebug short_stack<br />
.....ktspfsrch()+559&lt;-ktspscan_bmb()+315 .....<br />
</code></p>
<p>It is important to understand that the problem is not necessarily related to the blocksize, but to the PCTFREE value. More information about this topic can be found here:</p>
<p><a href="http://structureddata.org/files/jl_test_case.html">http://structureddata.org/files/jl_test_case.html</a><br />
<a href="http://structureddata.org/2008/09/08/understanding-performance/">http://structureddata.org/2008/09/08/understanding-performance/</a><br />
<a href="http://www.oraclealchemist.com/oracle/hey-guys-does-size-matter/">http://www.oraclealchemist.com/oracle/hey-guys-does-size-matter/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2009/04/09/assm-problem-with-too-low-pctfree/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intelligent (aka adaptive) Cursor Sharing Problem</title>
		<link>http://www.ora-solutions.net/web/2009/03/12/intelligent-aka-adaptive-cursor-sharing-problem/</link>
		<comments>http://www.ora-solutions.net/web/2009/03/12/intelligent-aka-adaptive-cursor-sharing-problem/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 05:01:40 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[11g]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[MetaLink]]></category>
		<category><![CDATA[Oracle Database]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=586</guid>
		<description><![CDATA[Today, at the last day of Hotsos Symposium 2009 Ric van Dyke presented on &#8220;Intelligent (aka adaptive) Cursor Sharing&#8221;, a new feature of Oracle Database 11g. The feature was created to fix the shortcomings of bind peeking on columns with histograms. Tom Kyte presented a few years ago on this topic when he talked about [...]]]></description>
			<content:encoded><![CDATA[<p>Today, at the last day of <a href="http://www.hotsos.com/sym09.html">Hotsos Symposium 2009</a> Ric van Dyke presented on &#8220;Intelligent (aka adaptive) Cursor Sharing&#8221;, a new feature of Oracle Database 11g. The feature was created to fix the shortcomings of bind peeking on columns with histograms. Tom Kyte presented a few years ago on this topic when he talked about the impact of the wheather on Oracle database performance.</p>
<p>During the very interesting presentation Ric presented with a demo how this feature works but also showed a nasty side effect. He tested it on a million row table with a column &#8220;object type&#8221;, which was skewed. He bound several different values to the object_type bind variable causing 2 different execution plans to be used for the same sql_id. The problem with it was that he ended up with dozens of child cursors showing V$SQL.IS_SHARABLE => N. </p>
<p>It was not known whether this is a bug or whether the whole concept is flawed. I searched on metalink and found the appropriate document:</p>
<blockquote><p>
<strong>Bug 6644714 &#8211; High number of child cursors with adaptive cursor sharing<br />
</strong>This issue is fixed in	</p>
<p>    * 11.2 (Future Release)<br />
    * 11.1.0.7 (Server Patch Set)<br />
Lots of child cursors may be produced with adaptive cursor sharing enabled,<br />
sometimes with overlapping or same bind value selectivity ranges (in v$sql_cs_selectivity).<br />
This problem shows as LOAD_OPTIMIZER_STATS=&#8217;Y&#8217; for many of the cursors in V$SQL_SHARED_CURSOR.</p>
<p> &#8211; and &#8211; </p>
<p><strong>Bug 7213010 &#8211; Adaptive cursor sharing generates lots of child cursors</strong></p>
<p>This issue is fixed in	</p>
<p>    * 11.2 (Future Release)<br />
    * 11.1.0.7 (Server Patch Set) </p>
<p>Lots of child cursors may be produced for a query with bind variables<br />
appearing in at least two simple relational predicates<br />
(eg. col <op> :b).  </p>
<p>v$sql_cs_selectivity shows that there are multiple equivalent / overlapping<br />
ranges for a single cursor.  The number of ranges gets bigger and bigger<br />
as the query is run more times.
</p></blockquote>
<p>I then tried to verify if the problem indeed is gone in 11.1.0.7 and found out, that it isn´t.</p>
<p>Here is my testcase:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;">SQL<span style="color: #66cc66;">&gt;</span> @<span style="color: #66cc66;">/</span>tmp<span style="color: #66cc66;">/</span>setup<span style="color: #66cc66;">.</span>sql
Connected<span style="color: #66cc66;">.</span>
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">DROP</span> <span style="color: #993333; font-weight: bold;">TABLE</span> tab1 purge;
&nbsp;
<span style="color: #993333; font-weight: bold;">TABLE</span> dropped<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> tab1 <span style="color: #66cc66;">&#40;</span>a int<span style="color: #66cc66;">,</span>
  <span style="color: #cc66cc;">2</span>                     b varchar2<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span>
  <span style="color: #cc66cc;">3</span>                                     padding varchar2<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">200</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #cc66cc;">4</span>  tablespace USERS;
&nbsp;
<span style="color: #993333; font-weight: bold;">TABLE</span> created<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">DROP</span> sequence myid;
&nbsp;
Sequence dropped<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">CREATE</span> sequence myid cache <span style="color: #cc66cc;">1000</span>;
&nbsp;
Sequence created<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> begin
  <span style="color: #cc66cc;">2</span>  <span style="color: #993333; font-weight: bold;">FOR</span> i <span style="color: #993333; font-weight: bold;">IN</span> 1<span style="color: #66cc66;">..</span>100000
  <span style="color: #cc66cc;">3</span>  loop
  <span style="color: #cc66cc;">4</span>          <span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> tab1 <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span>myid<span style="color: #66cc66;">.</span><span style="color: #993333; font-weight: bold;">NEXTVAL</span><span style="color: #66cc66;">,</span>
  <span style="color: #cc66cc;">5</span>                                                           <span style="color: #ff0000;">'AAAAAAAAAA'</span><span style="color: #66cc66;">,</span>
  <span style="color: #cc66cc;">6</span>                                                           rpad<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'*'</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">200</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'*'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #cc66cc;">7</span>  end loop;
  <span style="color: #cc66cc;">8</span>
  <span style="color: #cc66cc;">9</span>  <span style="color: #993333; font-weight: bold;">FOR</span> i <span style="color: #993333; font-weight: bold;">IN</span> 1<span style="color: #66cc66;">..</span>1000
 <span style="color: #cc66cc;">10</span>  loop
 <span style="color: #cc66cc;">11</span>          <span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> tab1 <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span>myid<span style="color: #66cc66;">.</span><span style="color: #993333; font-weight: bold;">NEXTVAL</span><span style="color: #66cc66;">,</span>
 <span style="color: #cc66cc;">12</span>                                                           <span style="color: #ff0000;">'BBBBBBBBBB'</span><span style="color: #66cc66;">,</span>
 <span style="color: #cc66cc;">13</span>                                                           rpad<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'*'</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">200</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'*'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
 <span style="color: #cc66cc;">14</span>  end loop;
 <span style="color: #cc66cc;">15</span>
 <span style="color: #cc66cc;">16</span>  <span style="color: #993333; font-weight: bold;">FOR</span> i <span style="color: #993333; font-weight: bold;">IN</span> 1<span style="color: #66cc66;">..</span>1000
 <span style="color: #cc66cc;">17</span>  loop
 <span style="color: #cc66cc;">18</span>          <span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> tab1 <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span>myid<span style="color: #66cc66;">.</span><span style="color: #993333; font-weight: bold;">NEXTVAL</span><span style="color: #66cc66;">,</span>
 <span style="color: #cc66cc;">19</span>                                                           <span style="color: #ff0000;">'CCCCCCCCCC'</span><span style="color: #66cc66;">,</span>
 <span style="color: #cc66cc;">20</span>                                                           rpad<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'*'</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">200</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'*'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
 <span style="color: #cc66cc;">21</span>  end loop;
 <span style="color: #cc66cc;">22</span>
 <span style="color: #cc66cc;">23</span>  <span style="color: #993333; font-weight: bold;">FOR</span> i <span style="color: #993333; font-weight: bold;">IN</span> 1<span style="color: #66cc66;">..</span>100
 <span style="color: #cc66cc;">24</span>  loop
 <span style="color: #cc66cc;">25</span>          <span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> tab1 <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span>myid<span style="color: #66cc66;">.</span><span style="color: #993333; font-weight: bold;">NEXTVAL</span><span style="color: #66cc66;">,</span>
 <span style="color: #cc66cc;">26</span>                                                           <span style="color: #ff0000;">'DDDDDDDDDD'</span><span style="color: #66cc66;">,</span>
 <span style="color: #cc66cc;">27</span>                                                           rpad<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'*'</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">200</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'*'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
 <span style="color: #cc66cc;">28</span>  end loop;
 <span style="color: #cc66cc;">29</span>
 <span style="color: #cc66cc;">30</span>  <span style="color: #993333; font-weight: bold;">FOR</span> i <span style="color: #993333; font-weight: bold;">IN</span> 1<span style="color: #66cc66;">..</span>10
 <span style="color: #cc66cc;">31</span>  loop
 <span style="color: #cc66cc;">32</span>          <span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> tab1 <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span>myid<span style="color: #66cc66;">.</span><span style="color: #993333; font-weight: bold;">NEXTVAL</span><span style="color: #66cc66;">,</span>
 <span style="color: #cc66cc;">33</span>                                                           <span style="color: #ff0000;">'EEEEEEEEEE'</span><span style="color: #66cc66;">,</span>
 <span style="color: #cc66cc;">34</span>                                                           rpad<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'*'</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">200</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'*'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
 <span style="color: #cc66cc;">35</span>  end loop;
 <span style="color: #cc66cc;">36</span>
 <span style="color: #cc66cc;">37</span>  <span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> tab1 <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span>myid<span style="color: #66cc66;">.</span><span style="color: #993333; font-weight: bold;">NEXTVAL</span><span style="color: #66cc66;">,</span>
 <span style="color: #cc66cc;">38</span>                                                           <span style="color: #ff0000;">'FFFFFFFFFF'</span><span style="color: #66cc66;">,</span>
 <span style="color: #cc66cc;">39</span>                                                           rpad<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'*'</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">200</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'*'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
 <span style="color: #cc66cc;">40</span>
 <span style="color: #cc66cc;">41</span>  commit;
 <span style="color: #cc66cc;">42</span>  end;
 <span style="color: #cc66cc;">43</span>  <span style="color: #66cc66;">/</span>
&nbsp;
PL<span style="color: #66cc66;">/</span>SQL procedure successfully completed<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">INDEX</span> tab1_idx1 <span style="color: #993333; font-weight: bold;">ON</span> tab1 <span style="color: #66cc66;">&#40;</span>b<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #993333; font-weight: bold;">INDEX</span> created<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> begin dbms_stats<span style="color: #66cc66;">.</span>gather_table_stats<span style="color: #66cc66;">&#40;</span>ownname <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">'MDECKER'</span><span style="color: #66cc66;">,</span>
  <span style="color: #cc66cc;">2</span>                                          tabname <span style="color: #66cc66;">=&gt;</span> <span style="color: #ff0000;">'TAB1'</span><span style="color: #66cc66;">,</span>
  <span style="color: #cc66cc;">3</span>                                          method_opt <span style="color: #66cc66;">=&gt;</span><span style="color: #ff0000;">'FOR ALL COLUMNS SIZE 254'</span><span style="color: #66cc66;">,</span>
  <span style="color: #cc66cc;">4</span>                                          cascade<span style="color: #66cc66;">=&gt;</span> TRUE<span style="color: #66cc66;">,</span>
  <span style="color: #cc66cc;">5</span>                                          estimate_percent <span style="color: #66cc66;">=&gt;</span> <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">,</span>
  <span style="color: #cc66cc;">6</span>                                          no_invalidate <span style="color: #66cc66;">=&gt;</span> FALSE<span style="color: #66cc66;">&#41;</span>;
  <span style="color: #cc66cc;">7</span>  end;
  <span style="color: #cc66cc;">8</span>  <span style="color: #66cc66;">/</span>
&nbsp;
PL<span style="color: #66cc66;">/</span>SQL procedure successfully completed<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SET</span> <span style="color: #993333; font-weight: bold;">LINES</span> <span style="color: #cc66cc;">300</span>
SQL<span style="color: #66cc66;">&gt;</span> col table_name format a10
SQL<span style="color: #66cc66;">&gt;</span> col owner format a8
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> owner<span style="color: #66cc66;">,</span> table_name<span style="color: #66cc66;">,</span>num_rows<span style="color: #66cc66;">,</span> blocks<span style="color: #66cc66;">,</span> round<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>blocks<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">8192</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">1024</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">1024</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> MB
  <span style="color: #cc66cc;">2</span>  <span style="color: #993333; font-weight: bold;">FROM</span> dba_tables <span style="color: #993333; font-weight: bold;">WHERE</span> table_name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'TAB1'</span> <span style="color: #993333; font-weight: bold;">AND</span> owner <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'MDECKER'</span>;
&nbsp;
OWNER    TABLE_NAME   NUM_ROWS     BLOCKS         MB
<span style="color: #808080; font-style: italic;">-------- ---------- ---------- ---------- ----------</span>
MDECKER  TAB1           <span style="color: #cc66cc;">102111</span>       <span style="color: #cc66cc;">3268</span>         <span style="color: #cc66cc;">26</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> prompt <span style="color: #ff0000;">&quot;Press Enter to continue&quot;</span>
<span style="color: #ff0000;">&quot;Press Enter to continue&quot;</span>
SQL<span style="color: #66cc66;">&gt;</span> pause
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #808080; font-style: italic;">/*
SQL&gt; OWNER       TABLE_NAME   NUM_ROWS  BLOCKS         MB
SQL&gt; -------- ---------- ---------- ---------- ----------
SQL&gt; MDECKER  TAB1           102111       3268         26
SQL&gt;
SQL&gt; */</span>
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> b <span style="color: #66cc66;">,</span> count<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">FROM</span> mdecker<span style="color: #66cc66;">.</span>tab1 <span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> b <span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">DESC</span>;
&nbsp;
B                      COUNT<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #808080; font-style: italic;">-------------------- ----------</span>
FFFFFFFFFF                    <span style="color: #cc66cc;">1</span>
EEEEEEEEEE                   <span style="color: #cc66cc;">10</span>
DDDDDDDDDD                  <span style="color: #cc66cc;">100</span>
CCCCCCCCCC                 <span style="color: #cc66cc;">1000</span>
BBBBBBBBBB                 <span style="color: #cc66cc;">1000</span>
AAAAAAAAAA               <span style="color: #cc66cc;">100000</span>
&nbsp;
<span style="color: #cc66cc;">6</span> rows selected<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #808080; font-style: italic;">/*
SQL&gt; B                      COUNT(*)
SQL&gt; -------------------- ----------
SQL&gt; FFFFFFFFFF                    1
SQL&gt; EEEEEEEEEE                   10
SQL&gt; DDDDDDDDDD                  100
SQL&gt; CCCCCCCCCC                 1000
SQL&gt; BBBBBBBBBB                 1000
SQL&gt; AAAAAAAAAA               100000
SQL&gt;
SQL&gt; 6 rows selected.
SQL&gt;
SQL&gt; */</span>
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> prompt <span style="color: #ff0000;">&quot;Press Enter to continue&quot;</span>
<span style="color: #ff0000;">&quot;Press Enter to continue&quot;</span>
SQL<span style="color: #66cc66;">&gt;</span> pause
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> num_buckets<span style="color: #66cc66;">,</span> histogram <span style="color: #993333; font-weight: bold;">FROM</span> dba_tab_col_statistics <span style="color: #993333; font-weight: bold;">WHERE</span> table_name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'TAB1'</span> <span style="color: #993333; font-weight: bold;">AND</span> column_name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'B'</span>;
&nbsp;
NUM_BUCKETS HISTOGRAM
<span style="color: #808080; font-style: italic;">----------- ---------------</span>
          <span style="color: #cc66cc;">6</span> FREQUENCY
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #808080; font-style: italic;">/*
SQL&gt; NUM_BUCKETS HISTOGRAM
SQL&gt; ----------- ---------------
SQL&gt;           6 FREQUENCY
SQL&gt; */</span>
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SHOW</span> user
USER <span style="color: #993333; font-weight: bold;">IS</span> <span style="color: #ff0000;">&quot;MDECKER&quot;</span>
SQL<span style="color: #66cc66;">&gt;</span> @<span style="color: #66cc66;">/</span>tmp<span style="color: #66cc66;">/</span>sql1<span style="color: #66cc66;">.</span>txt
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SET</span> <span style="color: #993333; font-weight: bold;">LINES</span> <span style="color: #cc66cc;">300</span>
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SET</span> echo <span style="color: #993333; font-weight: bold;">ON</span>
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SET</span> pages <span style="color: #cc66cc;">10000</span>
SQL<span style="color: #66cc66;">&gt;</span> col bind format a120
SQL<span style="color: #66cc66;">&gt;</span> prompt <span style="color: #ff0000;">&quot;Press enter to run&quot;</span>
<span style="color: #ff0000;">&quot;Press enter to run&quot;</span>
SQL<span style="color: #66cc66;">&gt;</span> pause
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> variable myvar varchar2<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span>
SQL<span style="color: #66cc66;">&gt;</span> exec :myvar :<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'AAAAAAAAAA'</span>;
&nbsp;
PL<span style="color: #66cc66;">/</span>SQL procedure successfully completed<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SET</span> termout off
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #993333; font-weight: bold;">TABLE</span><span style="color: #66cc66;">&#40;</span>dbms_xplan<span style="color: #66cc66;">.</span>display_cursor<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
PLAN_TABLE_OUTPUT
<span style="color: #808080; font-style: italic;">-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------   -----------------------------------------------------------------</span>
SQL_ID  fhtgpcv2m2j4s<span style="color: #66cc66;">,</span> child number <span style="color: #cc66cc;">0</span>
<span style="color: #808080; font-style: italic;">-------------------------------------</span>
<span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #808080; font-style: italic;">/* MD_TESTCASE */</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> tab1 <span style="color: #993333; font-weight: bold;">WHERE</span> b <span style="color: #66cc66;">=</span> :myvar
&nbsp;
Plan hash value: <span style="color: #cc66cc;">2211052296</span>
&nbsp;
<span style="color: #808080; font-style: italic;">--------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span> Id  <span style="color: #66cc66;">|</span> Operation         <span style="color: #66cc66;">|</span> Name <span style="color: #66cc66;">|</span> Rows  <span style="color: #66cc66;">|</span> Bytes <span style="color: #66cc66;">|</span> Cost <span style="color: #66cc66;">&#40;</span>%CPU<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> Time     <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">--------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">SELECT</span> STATEMENT  <span style="color: #66cc66;">|</span>      <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">889</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span>          <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|*</span>  <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span>  <span style="color: #993333; font-weight: bold;">TABLE</span> ACCESS <span style="color: #993333; font-weight: bold;">FULL</span><span style="color: #66cc66;">|</span> TAB1 <span style="color: #66cc66;">|</span>   100K<span style="color: #66cc66;">|</span>    20M<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">889</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:00:<span style="color: #cc66cc;">11</span> <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">--------------------------------------------------------------------------</span>
&nbsp;
Predicate Information <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> operation id<span style="color: #66cc66;">&#41;</span>:
<span style="color: #808080; font-style: italic;">---------------------------------------------------</span>
&nbsp;
   <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">-</span> filter<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;B&quot;</span><span style="color: #66cc66;">=</span>:MYVAR<span style="color: #66cc66;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #cc66cc;">18</span> rows selected<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> sql_id<span style="color: #66cc66;">,</span> is_obsolete<span style="color: #66cc66;">,</span> is_bind_sensitive<span style="color: #66cc66;">,</span> is_bind_aware<span style="color: #66cc66;">,</span> is_shareable<span style="color: #66cc66;">,</span> dbms_sqltune<span style="color: #66cc66;">.</span>extract_binds<span style="color: #66cc66;">&#40;</span>bind_data<span style="color: #66cc66;">&#41;</span> bind<span style="color: #66cc66;">,</span> plan_hash_value<span style="color: #66cc66;">,</span> child_number <span style="color: #993333; font-weight: bold;">FROM</span>
  <span style="color: #cc66cc;">2</span>   v$sql <span style="color: #993333; font-weight: bold;">WHERE</span> sql_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'fhtgpcv2m2j4s'</span>;
&nbsp;
SQL_ID        I I I I BIND<span style="color: #66cc66;">&#40;</span>NAME<span style="color: #66cc66;">,</span> POSITION<span style="color: #66cc66;">,</span> DUP_POSITION<span style="color: #66cc66;">,</span> DATATYPE<span style="color: #66cc66;">,</span> DATATYPE_STRING<span style="color: #66cc66;">,</span> CHARACTER_SID<span style="color: #66cc66;">,</span> PRECISION<span style="color: #66cc66;">,</span> SCALE<span style="color: #66cc66;">,</span> MAX_LENGTH<span style="color: #66cc66;">,</span> LAST_CAPTURED PLAN_HASH_VALUE CHILD_NUMBER
<span style="color: #808080; font-style: italic;">------------- - - - - ------------------------------------------------------------------------------------------------------------------------ --------------- ------------</span>
fhtgpcv2m2j4s N Y N Y SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'AAAAAAAAAA'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">2211052296</span>            <span style="color: #cc66cc;">0</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> prompt <span style="color: #ff0000;">&quot;Press enter to run&quot;</span>
<span style="color: #ff0000;">&quot;Press enter to run&quot;</span>
SQL<span style="color: #66cc66;">&gt;</span> pause
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> exec :myvar :<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'BBBBBBBBBB'</span>;
&nbsp;
PL<span style="color: #66cc66;">/</span>SQL procedure successfully completed<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SET</span> termout off
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #993333; font-weight: bold;">TABLE</span><span style="color: #66cc66;">&#40;</span>dbms_xplan<span style="color: #66cc66;">.</span>display_cursor<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
PLAN_TABLE_OUTPUT
<span style="color: #808080; font-style: italic;">-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------   -----------------------------------------------------------------</span>
SQL_ID  fhtgpcv2m2j4s<span style="color: #66cc66;">,</span> child number <span style="color: #cc66cc;">0</span>
<span style="color: #808080; font-style: italic;">-------------------------------------</span>
<span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #808080; font-style: italic;">/* MD_TESTCASE */</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> tab1 <span style="color: #993333; font-weight: bold;">WHERE</span> b <span style="color: #66cc66;">=</span> :myvar
&nbsp;
Plan hash value: <span style="color: #cc66cc;">2211052296</span>
&nbsp;
<span style="color: #808080; font-style: italic;">--------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span> Id  <span style="color: #66cc66;">|</span> Operation         <span style="color: #66cc66;">|</span> Name <span style="color: #66cc66;">|</span> Rows  <span style="color: #66cc66;">|</span> Bytes <span style="color: #66cc66;">|</span> Cost <span style="color: #66cc66;">&#40;</span>%CPU<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> Time     <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">--------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">SELECT</span> STATEMENT  <span style="color: #66cc66;">|</span>      <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">889</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span>          <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|*</span>  <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span>  <span style="color: #993333; font-weight: bold;">TABLE</span> ACCESS <span style="color: #993333; font-weight: bold;">FULL</span><span style="color: #66cc66;">|</span> TAB1 <span style="color: #66cc66;">|</span>   100K<span style="color: #66cc66;">|</span>    20M<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">889</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:00:<span style="color: #cc66cc;">11</span> <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">--------------------------------------------------------------------------</span>
&nbsp;
Predicate Information <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> operation id<span style="color: #66cc66;">&#41;</span>:
<span style="color: #808080; font-style: italic;">---------------------------------------------------</span>
&nbsp;
   <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">-</span> filter<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;B&quot;</span><span style="color: #66cc66;">=</span>:MYVAR<span style="color: #66cc66;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #cc66cc;">18</span> rows selected<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> sql_id<span style="color: #66cc66;">,</span> is_obsolete<span style="color: #66cc66;">,</span> is_bind_sensitive<span style="color: #66cc66;">,</span> is_bind_aware<span style="color: #66cc66;">,</span> is_shareable<span style="color: #66cc66;">,</span> dbms_sqltune<span style="color: #66cc66;">.</span>extract_binds<span style="color: #66cc66;">&#40;</span>bind_data<span style="color: #66cc66;">&#41;</span> bind<span style="color: #66cc66;">,</span> plan_hash_value<span style="color: #66cc66;">,</span> child_number <span style="color: #993333; font-weight: bold;">FROM</span>
  <span style="color: #cc66cc;">2</span>   v$sql <span style="color: #993333; font-weight: bold;">WHERE</span> sql_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'fhtgpcv2m2j4s'</span>;
&nbsp;
SQL_ID        I I I I BIND<span style="color: #66cc66;">&#40;</span>NAME<span style="color: #66cc66;">,</span> POSITION<span style="color: #66cc66;">,</span> DUP_POSITION<span style="color: #66cc66;">,</span> DATATYPE<span style="color: #66cc66;">,</span> DATATYPE_STRING<span style="color: #66cc66;">,</span> CHARACTER_SID<span style="color: #66cc66;">,</span> PRECISION<span style="color: #66cc66;">,</span> SCALE<span style="color: #66cc66;">,</span> MAX_LENGTH<span style="color: #66cc66;">,</span> LAST_CAPTURED PLAN_HASH_VALUE CHILD_NUMBER
<span style="color: #808080; font-style: italic;">------------- - - - - ------------------------------------------------------------------------------------------------------------------------ --------------- ------------</span>
fhtgpcv2m2j4s N Y N Y SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'AAAAAAAAAA'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">2211052296</span>            <span style="color: #cc66cc;">0</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> exec :myvar :<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'CCCCCCCCCC'</span>;
&nbsp;
PL<span style="color: #66cc66;">/</span>SQL procedure successfully completed<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> prompt <span style="color: #ff0000;">&quot;Press enter to run&quot;</span>
<span style="color: #ff0000;">&quot;Press enter to run&quot;</span>
SQL<span style="color: #66cc66;">&gt;</span> pause
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SET</span> termout off
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #993333; font-weight: bold;">TABLE</span><span style="color: #66cc66;">&#40;</span>dbms_xplan<span style="color: #66cc66;">.</span>display_cursor<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
PLAN_TABLE_OUTPUT
<span style="color: #808080; font-style: italic;">-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------   -----------------------------------------------------------------</span>
SQL_ID  fhtgpcv2m2j4s<span style="color: #66cc66;">,</span> child number <span style="color: #cc66cc;">1</span>
<span style="color: #808080; font-style: italic;">-------------------------------------</span>
<span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #808080; font-style: italic;">/* MD_TESTCASE */</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> tab1 <span style="color: #993333; font-weight: bold;">WHERE</span> b <span style="color: #66cc66;">=</span> :myvar
&nbsp;
Plan hash value: <span style="color: #cc66cc;">1918680838</span>
&nbsp;
<span style="color: #808080; font-style: italic;">-----------------------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span> Id  <span style="color: #66cc66;">|</span> Operation                   <span style="color: #66cc66;">|</span> Name      <span style="color: #66cc66;">|</span> Rows  <span style="color: #66cc66;">|</span> Bytes <span style="color: #66cc66;">|</span> Cost <span style="color: #66cc66;">&#40;</span>%CPU<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> Time     <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">-----------------------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">SELECT</span> STATEMENT            <span style="color: #66cc66;">|</span>           <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>    <span style="color: #cc66cc;">36</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span>          <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span>  <span style="color: #993333; font-weight: bold;">TABLE</span> ACCESS <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #993333; font-weight: bold;">INDEX</span> ROWID<span style="color: #66cc66;">|</span> TAB1      <span style="color: #66cc66;">|</span>  <span style="color: #cc66cc;">1000</span> <span style="color: #66cc66;">|</span>   210K<span style="color: #66cc66;">|</span>    <span style="color: #cc66cc;">36</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:00:01 <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|*</span>  <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">|</span>   <span style="color: #993333; font-weight: bold;">INDEX</span> RANGE SCAN          <span style="color: #66cc66;">|</span> TAB1_IDX1 <span style="color: #66cc66;">|</span>  <span style="color: #cc66cc;">1000</span> <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">4</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:00:01 <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">-----------------------------------------------------------------------------------------</span>
&nbsp;
Predicate Information <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> operation id<span style="color: #66cc66;">&#41;</span>:
<span style="color: #808080; font-style: italic;">---------------------------------------------------</span>
&nbsp;
   <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">-</span> access<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;B&quot;</span><span style="color: #66cc66;">=</span>:MYVAR<span style="color: #66cc66;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #cc66cc;">19</span> rows selected<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> sql_id<span style="color: #66cc66;">,</span> is_obsolete<span style="color: #66cc66;">,</span> is_bind_sensitive<span style="color: #66cc66;">,</span> is_bind_aware<span style="color: #66cc66;">,</span> is_shareable<span style="color: #66cc66;">,</span> dbms_sqltune<span style="color: #66cc66;">.</span>extract_binds<span style="color: #66cc66;">&#40;</span>bind_data<span style="color: #66cc66;">&#41;</span> bind<span style="color: #66cc66;">,</span> plan_hash_value<span style="color: #66cc66;">,</span> child_number <span style="color: #993333; font-weight: bold;">FROM</span>
  <span style="color: #cc66cc;">2</span>   v$sql <span style="color: #993333; font-weight: bold;">WHERE</span> sql_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'fhtgpcv2m2j4s'</span>;
&nbsp;
SQL_ID        I I I I BIND<span style="color: #66cc66;">&#40;</span>NAME<span style="color: #66cc66;">,</span> POSITION<span style="color: #66cc66;">,</span> DUP_POSITION<span style="color: #66cc66;">,</span> DATATYPE<span style="color: #66cc66;">,</span> DATATYPE_STRING<span style="color: #66cc66;">,</span> CHARACTER_SID<span style="color: #66cc66;">,</span> PRECISION<span style="color: #66cc66;">,</span> SCALE<span style="color: #66cc66;">,</span> MAX_LENGTH<span style="color: #66cc66;">,</span> LAST_CAPTURED PLAN_HASH_VALUE CHILD_NUMBER
<span style="color: #808080; font-style: italic;">------------- - - - - ------------------------------------------------------------------------------------------------------------------------ --------------- ------------</span>
fhtgpcv2m2j4s N Y N Y SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'AAAAAAAAAA'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">2211052296</span>            <span style="color: #cc66cc;">0</span>
fhtgpcv2m2j4s N Y Y Y SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'CCCCCCCCCC'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">1918680838</span>            <span style="color: #cc66cc;">1</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> exec :myvar :<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'DDDDDDDDDD'</span>;
&nbsp;
PL<span style="color: #66cc66;">/</span>SQL procedure successfully completed<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> prompt <span style="color: #ff0000;">&quot;Press enter to run&quot;</span>
<span style="color: #ff0000;">&quot;Press enter to run&quot;</span>
SQL<span style="color: #66cc66;">&gt;</span> pause
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SET</span> termout off
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #993333; font-weight: bold;">TABLE</span><span style="color: #66cc66;">&#40;</span>dbms_xplan<span style="color: #66cc66;">.</span>display_cursor<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
PLAN_TABLE_OUTPUT
<span style="color: #808080; font-style: italic;">-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------   -----------------------------------------------------------------</span>
SQL_ID  fhtgpcv2m2j4s<span style="color: #66cc66;">,</span> child number <span style="color: #cc66cc;">2</span>
<span style="color: #808080; font-style: italic;">-------------------------------------</span>
<span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #808080; font-style: italic;">/* MD_TESTCASE */</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> tab1 <span style="color: #993333; font-weight: bold;">WHERE</span> b <span style="color: #66cc66;">=</span> :myvar
&nbsp;
Plan hash value: <span style="color: #cc66cc;">1918680838</span>
&nbsp;
<span style="color: #808080; font-style: italic;">-----------------------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span> Id  <span style="color: #66cc66;">|</span> Operation                   <span style="color: #66cc66;">|</span> Name      <span style="color: #66cc66;">|</span> Rows  <span style="color: #66cc66;">|</span> Bytes <span style="color: #66cc66;">|</span> Cost <span style="color: #66cc66;">&#40;</span>%CPU<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> Time     <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">-----------------------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">SELECT</span> STATEMENT            <span style="color: #66cc66;">|</span>           <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">5</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span>          <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span>  <span style="color: #993333; font-weight: bold;">TABLE</span> ACCESS <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #993333; font-weight: bold;">INDEX</span> ROWID<span style="color: #66cc66;">|</span> TAB1      <span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">100</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">21600</span> <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">5</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:00:01 <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|*</span>  <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">|</span>   <span style="color: #993333; font-weight: bold;">INDEX</span> RANGE SCAN          <span style="color: #66cc66;">|</span> TAB1_IDX1 <span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">100</span> <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">1</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:00:01 <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">-----------------------------------------------------------------------------------------</span>
&nbsp;
Predicate Information <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> operation id<span style="color: #66cc66;">&#41;</span>:
<span style="color: #808080; font-style: italic;">---------------------------------------------------</span>
&nbsp;
   <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">-</span> access<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;B&quot;</span><span style="color: #66cc66;">=</span>:MYVAR<span style="color: #66cc66;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #cc66cc;">19</span> rows selected<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> sql_id<span style="color: #66cc66;">,</span> is_obsolete<span style="color: #66cc66;">,</span> is_bind_sensitive<span style="color: #66cc66;">,</span> is_bind_aware<span style="color: #66cc66;">,</span> is_shareable<span style="color: #66cc66;">,</span> dbms_sqltune<span style="color: #66cc66;">.</span>extract_binds<span style="color: #66cc66;">&#40;</span>bind_data<span style="color: #66cc66;">&#41;</span> bind<span style="color: #66cc66;">,</span> plan_hash_value<span style="color: #66cc66;">,</span> child_number <span style="color: #993333; font-weight: bold;">FROM</span>
  <span style="color: #cc66cc;">2</span>   v$sql <span style="color: #993333; font-weight: bold;">WHERE</span> sql_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'fhtgpcv2m2j4s'</span>;
&nbsp;
SQL_ID        I I I I BIND<span style="color: #66cc66;">&#40;</span>NAME<span style="color: #66cc66;">,</span> POSITION<span style="color: #66cc66;">,</span> DUP_POSITION<span style="color: #66cc66;">,</span> DATATYPE<span style="color: #66cc66;">,</span> DATATYPE_STRING<span style="color: #66cc66;">,</span> CHARACTER_SID<span style="color: #66cc66;">,</span> PRECISION<span style="color: #66cc66;">,</span> SCALE<span style="color: #66cc66;">,</span> MAX_LENGTH<span style="color: #66cc66;">,</span> LAST_CAPTURED PLAN_HASH_VALUE CHILD_NUMBER
<span style="color: #808080; font-style: italic;">------------- - - - - ------------------------------------------------------------------------------------------------------------------------ --------------- ------------</span>
fhtgpcv2m2j4s N Y N Y SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'AAAAAAAAAA'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">2211052296</span>            <span style="color: #cc66cc;">0</span>
fhtgpcv2m2j4s N Y Y N SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'CCCCCCCCCC'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">1918680838</span>            <span style="color: #cc66cc;">1</span>
fhtgpcv2m2j4s N Y Y Y SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'DDDDDDDDDD'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">1918680838</span>            <span style="color: #cc66cc;">2</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> exec :myvar :<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'EEEEEEEEEE'</span>;
&nbsp;
PL<span style="color: #66cc66;">/</span>SQL procedure successfully completed<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> prompt <span style="color: #ff0000;">&quot;Press enter to run&quot;</span>
<span style="color: #ff0000;">&quot;Press enter to run&quot;</span>
SQL<span style="color: #66cc66;">&gt;</span> pause
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SET</span> termout off
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #993333; font-weight: bold;">TABLE</span><span style="color: #66cc66;">&#40;</span>dbms_xplan<span style="color: #66cc66;">.</span>display_cursor<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
PLAN_TABLE_OUTPUT
<span style="color: #808080; font-style: italic;">-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------   -----------------------------------------------------------------</span>
SQL_ID  fhtgpcv2m2j4s<span style="color: #66cc66;">,</span> child number <span style="color: #cc66cc;">3</span>
<span style="color: #808080; font-style: italic;">-------------------------------------</span>
<span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #808080; font-style: italic;">/* MD_TESTCASE */</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> tab1 <span style="color: #993333; font-weight: bold;">WHERE</span> b <span style="color: #66cc66;">=</span> :myvar
&nbsp;
Plan hash value: <span style="color: #cc66cc;">1918680838</span>
&nbsp;
<span style="color: #808080; font-style: italic;">-----------------------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span> Id  <span style="color: #66cc66;">|</span> Operation                   <span style="color: #66cc66;">|</span> Name      <span style="color: #66cc66;">|</span> Rows  <span style="color: #66cc66;">|</span> Bytes <span style="color: #66cc66;">|</span> Cost <span style="color: #66cc66;">&#40;</span>%CPU<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> Time     <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">-----------------------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">SELECT</span> STATEMENT            <span style="color: #66cc66;">|</span>           <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span>          <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span>  <span style="color: #993333; font-weight: bold;">TABLE</span> ACCESS <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #993333; font-weight: bold;">INDEX</span> ROWID<span style="color: #66cc66;">|</span> TAB1      <span style="color: #66cc66;">|</span>    <span style="color: #cc66cc;">10</span> <span style="color: #66cc66;">|</span>  <span style="color: #cc66cc;">2160</span> <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">2</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:00:01 <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|*</span>  <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">|</span>   <span style="color: #993333; font-weight: bold;">INDEX</span> RANGE SCAN          <span style="color: #66cc66;">|</span> TAB1_IDX1 <span style="color: #66cc66;">|</span>    <span style="color: #cc66cc;">10</span> <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">1</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:00:01 <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">-----------------------------------------------------------------------------------------</span>
&nbsp;
Predicate Information <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> operation id<span style="color: #66cc66;">&#41;</span>:
<span style="color: #808080; font-style: italic;">---------------------------------------------------</span>
&nbsp;
   <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">-</span> access<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;B&quot;</span><span style="color: #66cc66;">=</span>:MYVAR<span style="color: #66cc66;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #cc66cc;">19</span> rows selected<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> sql_id<span style="color: #66cc66;">,</span> is_obsolete<span style="color: #66cc66;">,</span> is_bind_sensitive<span style="color: #66cc66;">,</span> is_bind_aware<span style="color: #66cc66;">,</span> is_shareable<span style="color: #66cc66;">,</span> dbms_sqltune<span style="color: #66cc66;">.</span>extract_binds<span style="color: #66cc66;">&#40;</span>bind_data<span style="color: #66cc66;">&#41;</span> bind<span style="color: #66cc66;">,</span> plan_hash_value<span style="color: #66cc66;">,</span> child_number <span style="color: #993333; font-weight: bold;">FROM</span>
  <span style="color: #cc66cc;">2</span>   v$sql <span style="color: #993333; font-weight: bold;">WHERE</span> sql_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'fhtgpcv2m2j4s'</span>;
&nbsp;
SQL_ID        I I I I BIND<span style="color: #66cc66;">&#40;</span>NAME<span style="color: #66cc66;">,</span> POSITION<span style="color: #66cc66;">,</span> DUP_POSITION<span style="color: #66cc66;">,</span> DATATYPE<span style="color: #66cc66;">,</span> DATATYPE_STRING<span style="color: #66cc66;">,</span> CHARACTER_SID<span style="color: #66cc66;">,</span> PRECISION<span style="color: #66cc66;">,</span> SCALE<span style="color: #66cc66;">,</span> MAX_LENGTH<span style="color: #66cc66;">,</span> LAST_CAPTURED PLAN_HASH_VALUE CHILD_NUMBER
<span style="color: #808080; font-style: italic;">------------- - - - - ------------------------------------------------------------------------------------------------------------------------ --------------- ------------</span>
fhtgpcv2m2j4s N Y N Y SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'AAAAAAAAAA'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">2211052296</span>            <span style="color: #cc66cc;">0</span>
fhtgpcv2m2j4s N Y Y N SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'CCCCCCCCCC'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">1918680838</span>            <span style="color: #cc66cc;">1</span>
fhtgpcv2m2j4s N Y Y N SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'DDDDDDDDDD'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">1918680838</span>            <span style="color: #cc66cc;">2</span>
fhtgpcv2m2j4s N Y Y Y SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'EEEEEEEEEE'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">1918680838</span>            <span style="color: #cc66cc;">3</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span>
SQL<span style="color: #66cc66;">&gt;</span> exec :myvar :<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'FFFFFFFFFF'</span>;
&nbsp;
PL<span style="color: #66cc66;">/</span>SQL procedure successfully completed<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> prompt <span style="color: #ff0000;">&quot;Press enter to run&quot;</span>
<span style="color: #ff0000;">&quot;Press enter to run&quot;</span>
SQL<span style="color: #66cc66;">&gt;</span> pause
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SET</span> termout off
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #993333; font-weight: bold;">TABLE</span><span style="color: #66cc66;">&#40;</span>dbms_xplan<span style="color: #66cc66;">.</span>display_cursor<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
PLAN_TABLE_OUTPUT
<span style="color: #808080; font-style: italic;">-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------   -----------------------------------------------------------------</span>
SQL_ID  fhtgpcv2m2j4s<span style="color: #66cc66;">,</span> child number <span style="color: #cc66cc;">4</span>
<span style="color: #808080; font-style: italic;">-------------------------------------</span>
<span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #808080; font-style: italic;">/* MD_TESTCASE */</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> tab1 <span style="color: #993333; font-weight: bold;">WHERE</span> b <span style="color: #66cc66;">=</span> :myvar
&nbsp;
Plan hash value: <span style="color: #cc66cc;">1918680838</span>
&nbsp;
<span style="color: #808080; font-style: italic;">-----------------------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span> Id  <span style="color: #66cc66;">|</span> Operation                   <span style="color: #66cc66;">|</span> Name      <span style="color: #66cc66;">|</span> Rows  <span style="color: #66cc66;">|</span> Bytes <span style="color: #66cc66;">|</span> Cost <span style="color: #66cc66;">&#40;</span>%CPU<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> Time     <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">-----------------------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">SELECT</span> STATEMENT            <span style="color: #66cc66;">|</span>           <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span>          <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span>  <span style="color: #993333; font-weight: bold;">TABLE</span> ACCESS <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #993333; font-weight: bold;">INDEX</span> ROWID<span style="color: #66cc66;">|</span> TAB1      <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">216</span> <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">2</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:00:01 <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|*</span>  <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">|</span>   <span style="color: #993333; font-weight: bold;">INDEX</span> RANGE SCAN          <span style="color: #66cc66;">|</span> TAB1_IDX1 <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">1</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:00:01 <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">-----------------------------------------------------------------------------------------</span>
&nbsp;
Predicate Information <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> operation id<span style="color: #66cc66;">&#41;</span>:
<span style="color: #808080; font-style: italic;">---------------------------------------------------</span>
&nbsp;
   <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">-</span> access<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;B&quot;</span><span style="color: #66cc66;">=</span>:MYVAR<span style="color: #66cc66;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #cc66cc;">19</span> rows selected<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> sql_id<span style="color: #66cc66;">,</span> is_obsolete<span style="color: #66cc66;">,</span> is_bind_sensitive<span style="color: #66cc66;">,</span> is_bind_aware<span style="color: #66cc66;">,</span> is_shareable<span style="color: #66cc66;">,</span> dbms_sqltune<span style="color: #66cc66;">.</span>extract_binds<span style="color: #66cc66;">&#40;</span>bind_data<span style="color: #66cc66;">&#41;</span> bind<span style="color: #66cc66;">,</span> plan_hash_value<span style="color: #66cc66;">,</span> child_number <span style="color: #993333; font-weight: bold;">FROM</span>
  <span style="color: #cc66cc;">2</span>   v$sql <span style="color: #993333; font-weight: bold;">WHERE</span> sql_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'fhtgpcv2m2j4s'</span>;
&nbsp;
SQL_ID        I I I I BIND<span style="color: #66cc66;">&#40;</span>NAME<span style="color: #66cc66;">,</span> POSITION<span style="color: #66cc66;">,</span> DUP_POSITION<span style="color: #66cc66;">,</span> DATATYPE<span style="color: #66cc66;">,</span> DATATYPE_STRING<span style="color: #66cc66;">,</span> CHARACTER_SID<span style="color: #66cc66;">,</span> PRECISION<span style="color: #66cc66;">,</span> SCALE<span style="color: #66cc66;">,</span> MAX_LENGTH<span style="color: #66cc66;">,</span> LAST_CAPTURED PLAN_HASH_VALUE CHILD_NUMBER
<span style="color: #808080; font-style: italic;">------------- - - - - ------------------------------------------------------------------------------------------------------------------------ --------------- ------------</span>
fhtgpcv2m2j4s N Y N Y SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'AAAAAAAAAA'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">2211052296</span>            <span style="color: #cc66cc;">0</span>
fhtgpcv2m2j4s N Y Y N SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'CCCCCCCCCC'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">1918680838</span>            <span style="color: #cc66cc;">1</span>
fhtgpcv2m2j4s N Y Y N SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'DDDDDDDDDD'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">1918680838</span>            <span style="color: #cc66cc;">2</span>
fhtgpcv2m2j4s N Y Y N SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'EEEEEEEEEE'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">1918680838</span>            <span style="color: #cc66cc;">3</span>
fhtgpcv2m2j4s N Y Y Y SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'FFFFFFFFFF'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">1918680838</span>            <span style="color: #cc66cc;">4</span></pre></td></tr></table></div>

<p>You can see that after parsing for bind CCCCCCCC, the execution plan changes from full table scan to index range scan. Moreover child cursor 1 is marked &#8220;is_bind_aware=Y&#8221;. When now bind DDDDDDDD is used, there is a new child (#2) and child 1 is set to is_sharable=N. After using bind EEEEEEEE, child #2 is set to sharable=N and a new child #3 is created. This repeats until there are 5 child cursors, 2 of which are set to is_sharable=Y. When the script is executed multiple times, there is even a sixth child cursor.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;">SQL_ID        I I I I BIND<span style="color: #66cc66;">&#40;</span>NAME<span style="color: #66cc66;">,</span> POSITION<span style="color: #66cc66;">,</span> DUP_POSITION<span style="color: #66cc66;">,</span> DATATYPE<span style="color: #66cc66;">,</span> DATATYPE_STRING<span style="color: #66cc66;">,</span> CHARACTER_SID<span style="color: #66cc66;">,</span> PRECISION<span style="color: #66cc66;">,</span> SCALE<span style="color: #66cc66;">,</span> MAX_LENGTH<span style="color: #66cc66;">,</span> LAST_CAPTURED PLAN_HASH_VALUE CHILD_NUMBER EXECUTIONS
<span style="color: #808080; font-style: italic;">------------- - - - - ------------------------------------------------------------------------------------------------------------------------ --------------- ------------ ----------</span>
fhtgpcv2m2j4s N Y N N SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'AAAAAAAAAA'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">2211052296</span>            <span style="color: #cc66cc;">0</span>          <span style="color: #cc66cc;">2</span>
fhtgpcv2m2j4s N Y Y N SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'CCCCCCCCCC'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">1918680838</span>            <span style="color: #cc66cc;">1</span>          <span style="color: #cc66cc;">1</span>
fhtgpcv2m2j4s N Y Y N SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'DDDDDDDDDD'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">1918680838</span>            <span style="color: #cc66cc;">2</span>          <span style="color: #cc66cc;">1</span>
fhtgpcv2m2j4s N Y Y N SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'EEEEEEEEEE'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">1918680838</span>            <span style="color: #cc66cc;">3</span>          <span style="color: #cc66cc;">1</span>
fhtgpcv2m2j4s N Y Y Y SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'FFFFFFFFFF'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">1918680838</span>            <span style="color: #cc66cc;">4</span>         <span style="color: #cc66cc;">16</span>
fhtgpcv2m2j4s N Y Y Y SQL_BIND_SET<span style="color: #66cc66;">&#40;</span>SQL_BIND<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'VARCHAR2(32)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">178</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">32</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'12-MAR-09'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'AAAAAAAAAA'</span><span style="color: #66cc66;">,</span> ANYDATA<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>           <span style="color: #cc66cc;">2211052296</span>            <span style="color: #cc66cc;">5</span>          <span style="color: #cc66cc;">3</span></pre></td></tr></table></div>

<p>I wondered why the cursors are not sharable and queried v$sql_shared_cursor:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;">SQL<span style="color: #66cc66;">&gt;</span>   <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> v$sql_shared_cursor <span style="color: #993333; font-weight: bold;">WHERE</span> sql_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'fhtgpcv2m2j4s'</span>;
&nbsp;
SQL_ID        ADDRESS  CHILD_AD CHILD_NUMBER U S O O S L F E B P I S T A B D L T R I I R L I O E M U T N F A I T D L D B P C S C P T M B M R O P M F L P L A F L R L H
<span style="color: #808080; font-style: italic;">------------- -------- -------- ------------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</span>
fhtgpcv2m2j4s 23F4E438 23F4DAB0            <span style="color: #cc66cc;">0</span> N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N Y N N N N N N
fhtgpcv2m2j4s 23F4E438 23D924D8            <span style="color: #cc66cc;">1</span> N N N N N N N N N N N N N N N N N N Y N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N
fhtgpcv2m2j4s 23F4E438 23D7E888            <span style="color: #cc66cc;">2</span> N N N N N N N N N N N N N N N N N N Y N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N
fhtgpcv2m2j4s 23F4E438 23D6B8C8            <span style="color: #cc66cc;">3</span> N N N N N N N N N N N N N N N N N N Y N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N
fhtgpcv2m2j4s 23F4E438 23D574D8            <span style="color: #cc66cc;">4</span> N N N N N N N N N N N N N N N N N N Y N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N
fhtgpcv2m2j4s 23F4E438 23B983B0            <span style="color: #cc66cc;">5</span> N N N N N N N N N N N N N N N N N N Y N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N
&nbsp;
<span style="color: #cc66cc;">6</span> rows selected<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> sql_id<span style="color: #66cc66;">,</span> address<span style="color: #66cc66;">,</span> child_number<span style="color: #66cc66;">,</span> LOAD_OPTIMIZER_STATS<span style="color: #66cc66;">,</span> row_level_sec_mismatch <span style="color: #993333; font-weight: bold;">FROM</span> v$sql_shared_cursor <span style="color: #993333; font-weight: bold;">WHERE</span> sql_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'fhtgpcv2m2j4s'</span>;
&nbsp;
SQL_ID        ADDRESS  CHILD_NUMBER L R
<span style="color: #808080; font-style: italic;">------------- -------- ------------ - -</span>
fhtgpcv2m2j4s 245CE53C            <span style="color: #cc66cc;">0</span> Y N
fhtgpcv2m2j4s 245CE53C            <span style="color: #cc66cc;">1</span> N Y
fhtgpcv2m2j4s 245CE53C            <span style="color: #cc66cc;">2</span> N Y
fhtgpcv2m2j4s 245CE53C            <span style="color: #cc66cc;">3</span> N Y
fhtgpcv2m2j4s 245CE53C            <span style="color: #cc66cc;">4</span> N Y
fhtgpcv2m2j4s 245CE53C            <span style="color: #cc66cc;">5</span> N Y
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> v$sql_cs_statistics <span style="color: #993333; font-weight: bold;">WHERE</span> sql_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'fhtgpcv2m2j4s'</span>;
&nbsp;
ADDRESS  HASH_VALUE SQL_ID        CHILD_NUMBER BIND_SET_HASH_VALUE P EXECUTIONS ROWS_PROCESSED BUFFER_GETS   CPU_TIME
<span style="color: #808080; font-style: italic;">-------- ---------- ------------- ------------ ------------------- - ---------- -------------- ----------- ----------</span>
245CE53C <span style="color: #cc66cc;">3308340376</span> fhtgpcv2m2j4s            <span style="color: #cc66cc;">5</span>          <span style="color: #cc66cc;">3946114705</span> N          <span style="color: #cc66cc;">1</span>              <span style="color: #cc66cc;">0</span>           <span style="color: #cc66cc;">2</span>          <span style="color: #cc66cc;">0</span>
245CE53C <span style="color: #cc66cc;">3308340376</span> fhtgpcv2m2j4s            <span style="color: #cc66cc;">5</span>          <span style="color: #cc66cc;">2785428864</span> Y          <span style="color: #cc66cc;">1</span>              <span style="color: #cc66cc;">0</span>           <span style="color: #cc66cc;">2</span>          <span style="color: #cc66cc;">0</span>
245CE53C <span style="color: #cc66cc;">3308340376</span> fhtgpcv2m2j4s            <span style="color: #cc66cc;">4</span>          <span style="color: #cc66cc;">1680726256</span> Y          <span style="color: #cc66cc;">1</span>              <span style="color: #cc66cc;">2</span>           <span style="color: #cc66cc;">3</span>          <span style="color: #cc66cc;">0</span>
245CE53C <span style="color: #cc66cc;">3308340376</span> fhtgpcv2m2j4s            <span style="color: #cc66cc;">3</span>          <span style="color: #cc66cc;">1438126164</span> Y          <span style="color: #cc66cc;">1</span>             <span style="color: #cc66cc;">20</span>           <span style="color: #cc66cc;">5</span>          <span style="color: #cc66cc;">0</span>
245CE53C <span style="color: #cc66cc;">3308340376</span> fhtgpcv2m2j4s            <span style="color: #cc66cc;">2</span>           <span style="color: #cc66cc;">451655377</span> Y          <span style="color: #cc66cc;">1</span>            <span style="color: #cc66cc;">200</span>          <span style="color: #cc66cc;">21</span>          <span style="color: #cc66cc;">0</span>
245CE53C <span style="color: #cc66cc;">3308340376</span> fhtgpcv2m2j4s            <span style="color: #cc66cc;">1</span>          <span style="color: #cc66cc;">4078512309</span> Y          <span style="color: #cc66cc;">1</span>           <span style="color: #cc66cc;">2000</span>         <span style="color: #cc66cc;">169</span>          <span style="color: #cc66cc;">0</span>
245CE53C <span style="color: #cc66cc;">3308340376</span> fhtgpcv2m2j4s            <span style="color: #cc66cc;">0</span>           <span style="color: #cc66cc;">479772785</span> Y          <span style="color: #cc66cc;">1</span>         <span style="color: #cc66cc;">100000</span>        <span style="color: #cc66cc;">9823</span>          <span style="color: #cc66cc;">0</span>
&nbsp;
<span style="color: #cc66cc;">7</span> rows selected<span style="color: #66cc66;">.</span>
&nbsp;
SQL<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> v$sql_cs_selectivity <span style="color: #993333; font-weight: bold;">WHERE</span> sql_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'fhtgpcv2m2j4s'</span>;
&nbsp;
ADDRESS  HASH_VALUE SQL_ID        CHILD_NUMBER PREDICATE                                  RANGE_ID LOW        HIGH
<span style="color: #808080; font-style: italic;">-------- ---------- ------------- ------------ ---------------------------------------- ---------- ---------- ----------</span>
245CE53C <span style="color: #cc66cc;">3308340376</span> fhtgpcv2m2j4s            <span style="color: #cc66cc;">5</span> <span style="color: #66cc66;">=</span>MYVAR                                            <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0.000004</span>   <span style="color: #cc66cc;">0.010773</span>
245CE53C <span style="color: #cc66cc;">3308340376</span> fhtgpcv2m2j4s            <span style="color: #cc66cc;">4</span> <span style="color: #66cc66;">=</span>MYVAR                                            <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0.000009</span>   <span style="color: #cc66cc;">0.010773</span>
245CE53C <span style="color: #cc66cc;">3308340376</span> fhtgpcv2m2j4s            <span style="color: #cc66cc;">3</span> <span style="color: #66cc66;">=</span>MYVAR                                            <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0.000088</span>   <span style="color: #cc66cc;">0.010773</span>
245CE53C <span style="color: #cc66cc;">3308340376</span> fhtgpcv2m2j4s            <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">=</span>MYVAR                                            <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0.000881</span>   <span style="color: #cc66cc;">0.010773</span>
245CE53C <span style="color: #cc66cc;">3308340376</span> fhtgpcv2m2j4s            <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">=</span>MYVAR                                            <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0.008814</span>   <span style="color: #cc66cc;">0.010773</span></pre></td></tr></table></div>

<p>It is not clear, why the cursors are not shared and why this is expressed in the flag &#8220;row_level_sec_mismatch&#8221;. From these tests we can see that the number of child cursors is still quite high.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2009/03/12/intelligent-aka-adaptive-cursor-sharing-problem/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Session waiting for &#8220;enq: RO &#8211; fast object reuse&#8221; &#8211; DBWR Process spinning on CPU</title>
		<link>http://www.ora-solutions.net/web/2009/01/20/session-waiting-for-enq-ro-fast-object-reuse-dbwr-process-spinning-on-cpu/</link>
		<comments>http://www.ora-solutions.net/web/2009/01/20/session-waiting-for-enq-ro-fast-object-reuse-dbwr-process-spinning-on-cpu/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 16:07:08 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[HP-UX]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Itanium]]></category>
		<category><![CDATA[MetaLink]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=564</guid>
		<description><![CDATA[I have encountered the following problem on a 10.2.0.4 database on Linux x86_64 today:
A user session has been waiting for &#8220;enq: RO &#8211; fast object reuse&#8221; for almost 60 minutes while executing a &#8220;truncate table&#8221; SQL statement.
SQL>  select username, event, sql_id, taddr, last_call_et from v$session where sid = 234;
USERNAME    EVENT  [...]]]></description>
			<content:encoded><![CDATA[<p>I have encountered the following problem on a 10.2.0.4 database on Linux x86_64 today:<br />
A user session has been waiting for &#8220;enq: RO &#8211; fast object reuse&#8221; for almost 60 minutes while executing a &#8220;truncate table&#8221; SQL statement.</p>
<blockquote><p>SQL>  select username, event, sql_id, taddr, last_call_et from v$session where sid = 234;</p>
<p>USERNAME    EVENT                         SQL_ID        TADDR            LAST_CALL_ET<br />
&#8212;&#8212;&#8212;-  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;<br />
MD          enq: RO &#8211; fast object reuse   ljk299jlkj003 0000000153264570 3542</p>
<p>SQL>  select sql_text from v$sqlstats where sql_id = &#8216;ljk299jlkj003&#8242;;</p>
<p>SQL_TEXT<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
truncate table tab1</p></blockquote>
<p>The Session was blocked by the CKPT process:</p>
<blockquote><p>SQL> select * from dba_waiters;</p>
<p>WAITING_SESSION HOLDING_SESSION LOCK_TYPE                  MODE_HELD                                MODE_REQUESTED                  LOCK_ID1   LOCK_ID2<br />
&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<br />
            234             423 RO                         Row-S (SS)                               Exclusive                  65573   1</p>
<p>SQL> select sid, serial#, sql_id, last_call_et, machine, program, username from v$session where sid = 423;</p>
<p>       SID    SERIAL# SQL_ID        LAST_CALL_ET MACHINE          PROGRAM<br />
&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
       423          1                4133636     ora-vm1.intra    oracle@ora-vm1.intra (CKPT)
</p></blockquote>
<p>The checkpoint process was waiting for database writer DBWR process, which was spinning on one cpu:</p>
<p>top</p>
<blockquote><p> PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND<br />
10712 oracle    25   0 2201m 1.7g 1.7g R 99.5 21.7 108:18.03 oracle</p></blockquote>
<p>PID 10712 maps to DBW0:</p>
<blockquote><p>[oracle@ora-vm1 ]$ ps -ef|grep 10712<br />
oracle   10712     1  0  2008 ?        03:23:05 ora_dbw0_MDDB01
</p></blockquote>
<p>mpstat</p>
<blockquote><p>Linux 2.6.9-78.ELsmp (ora-vm1.intra)        01/20/2009</p>
<p>02:21:56 PM  CPU   %user   %nice %system %iowait    %irq   %soft   %idle    intr/s<br />
02:21:57 PM  all   49.75    0.00    0.00    0.00    0.00    0.00   50.25   1055.00<br />
02:21:57 PM    0    0.00    0.00    0.00    0.00    0.00    0.00  100.00   1006.00<br />
02:21:57 PM    1  100.00    0.00    0.00    0.00    0.00    0.00    0.00     49.00</p>
<p>02:21:57 PM  CPU   %user   %nice %system %iowait    %irq   %soft   %idle    intr/s<br />
02:21:58 PM  all   50.75    0.00    0.00    0.50    0.00    0.00   48.76   1161.00<br />
02:21:58 PM    0    1.00    0.00    0.00    1.00    0.00    0.00   98.00   1087.00<br />
02:21:58 PM    1  100.00    0.00    0.00    0.00    0.00    0.00    0.00     74.00
</p></blockquote>
<p>The stack of dbw0 during the time showed these signatures:</p>
<blockquote><p>[oracle@ora-vm1 oracle]$ pstack 10712<br />
#0  0&#215;000000000074b7fb in kslfre ()<br />
#1  0&#215;00000000010ccc3b in kcbo_exam_buf ()<br />
#2  0&#215;00000000010d0d62 in kcbo_service_ockpt ()<br />
#3  0&#215;0000000001080cd7 in kcbbdrv ()<br />
#4  0&#215;00000000007ddcc2 in ksbabs ()<br />
#5  0&#215;00000000007e4b32 in ksbrdp ()<br />
#6  0&#215;0000000002efcb50 in opirip ()<br />
#7  0&#215;00000000012da326 in opidrv ()<br />
#8  0&#215;0000000001e62456 in sou2o ()<br />
#9  0&#215;00000000006d2555 in opimai_real ()<br />
#10 0&#215;00000000006d240c in main ()<br />
[oracle@ora-vm1 oracle]$ pstack 10712<br />
#0  0&#215;000000000074b36d in kslfre ()<br />
#1  0&#215;00000000010cc203 in kcbo_write_process ()<br />
#2  0&#215;00000000010ce608 in kcbo_write_q ()<br />
#3  0&#215;0000000001080a6d in kcbbdrv ()<br />
#4  0&#215;00000000007ddcc2 in ksbabs ()<br />
#5  0&#215;00000000007e4b32 in ksbrdp ()<br />
#6  0&#215;0000000002efcb50 in opirip ()<br />
#7  0&#215;00000000012da326 in opidrv ()<br />
#8  0&#215;0000000001e62456 in sou2o ()<br />
#9  0&#215;00000000006d2555 in opimai_real ()<br />
#10 0&#215;00000000006d240c in main ()<br />
[oracle@ora-vm1 oracle]$ pstack 10712<br />
#0  0&#215;00000000010ccb60 in kcbo_exam_buf ()<br />
#1  0&#215;00000000010d0d62 in kcbo_service_ockpt ()<br />
#2  0&#215;0000000001080cd7 in kcbbdrv ()<br />
#3  0&#215;00000000007ddcc2 in ksbabs ()<br />
#4  0&#215;00000000007e4b32 in ksbrdp ()<br />
#5  0&#215;0000000002efcb50 in opirip ()<br />
#6  0&#215;00000000012da326 in opidrv ()<br />
#7  0&#215;0000000001e62456 in sou2o ()<br />
#8  0&#215;00000000006d2555 in opimai_real ()<br />
#9  0&#215;00000000006d240c in main ()<br />
[oracle@ora-vm1 oracle]$ pstack 10712<br />
#0  0&#215;00000000010d0da5 in kcbo_service_ockpt ()<br />
#1  0&#215;0000000001080cd7 in kcbbdrv ()<br />
#2  0&#215;00000000007ddcc2 in ksbabs ()<br />
#3  0&#215;00000000007e4b32 in ksbrdp ()<br />
#4  0&#215;0000000002efcb50 in opirip ()<br />
#5  0&#215;00000000012da326 in opidrv ()<br />
#6  0&#215;0000000001e62456 in sou2o ()<br />
#7  0&#215;00000000006d2555 in opimai_real ()<br />
#8  0&#215;00000000006d240c in main ()</p></blockquote>
<p>A MetaLink Research for the term &#8220;kcbo_service_ockpt&#8221; leads to Bug 7376934, which is a duplicate of Bug 7385253 &#8211; DBWR IS CONSUMING HIGH CPU. </p>
<p>Patch 7385253 is available for Linux x86_64, HP-UX, Solaris, AIX.<br />
Reference:<br />
MetaLink Note 762085.1 &#8211; Subject: 	&#8216;enq: RO &#8211; fast object reuse&#8217; contention when gathering schema/table statistics in parallel</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2009/01/20/session-waiting-for-enq-ro-fast-object-reuse-dbwr-process-spinning-on-cpu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Huge Space Consumption by $ORACLE_HOME/.patch_storage</title>
		<link>http://www.ora-solutions.net/web/2009/01/15/huge-space-consumption-by-oracle_homepatch_storage/</link>
		<comments>http://www.ora-solutions.net/web/2009/01/15/huge-space-consumption-by-oracle_homepatch_storage/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 16:05:01 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[10g]]></category>
		<category><![CDATA[11g]]></category>
		<category><![CDATA[MetaLink]]></category>
		<category><![CDATA[Oracle Database]]></category>

		<guid isPermaLink="false">http://www.ora-solutions.net/web/?p=559</guid>
		<description><![CDATA[If you are keeping your system up to date with Patchsets, Patch Bundles, Merge Label Requests (MLR) or Critical Patch Updates (CPU), you will most likely suffer from a huge .patch_storage Subdirectory in your $ORACLE_HOME.
On one of my databases it looked like this:
Space used by $ORACLE_HOME: 7 GB
Space used by $ORACLE_HOME/.patch_storage: 4.3 GB
Can data in [...]]]></description>
			<content:encoded><![CDATA[<p>If you are keeping your system up to date with Patchsets, Patch Bundles, Merge Label Requests (MLR) or Critical Patch Updates (CPU), you will most likely suffer from a huge .patch_storage Subdirectory in your $ORACLE_HOME.</p>
<p>On one of my databases it looked like this:</p>
<p>Space used by $ORACLE_HOME: 7 GB<br />
Space used by $ORACLE_HOME/.patch_storage: 4.3 GB</p>
<p>Can data in this directory be removed?</p>
<p>MetaLink Note 550522.1 (Subject: How To Avoid Disk Full Issues Because OPatch Backups Take Big Amount Of Disk Space.) has the answer and tells you: it depends. Normally, this data is used in order to be able to rollback a patch. However, if you have installed a patchset (eg. 10.2.0.4), then the patches for the previous patchset (10.2.0.3) which are located in the .patch_storage directory are not needed anymore and can be removed. However, I would not recommend that you delete the directories manually yourself, as this would not be supported. Instead let Oracle do it for you:</p>
<p><strong>Recent versions of opatch (current is 10.2.0.4.5 as of January 2009) have a utility included, which removes patches not needed anymore from the .patch_storage directory. Moreover, the opatch utility creates these .patch_storage backup directories more intelligently which should result in less space wasted.</strong></p>
<blockquote><p>[oracle@vmhost1 ora10]$./OPatch/opatch util Cleanup<br />
Invoking OPatch 10.2.0.4.5</p>
<p>Oracle Interim Patch Installer version 10.2.0.4.5<br />
Copyright (c) 2008, Oracle Corporation.  All rights reserved.</p>
<p>UTIL session</p>
<p>Oracle Home       : /oracle/ora10<br />
Central Inventory : /oracle/oraInventory<br />
   from           : /var/opt/oracle/oraInst.loc<br />
OPatch version    : 10.2.0.4.5<br />
OUI version       : 10.2.0.4.0<br />
OUI location      : /oracle/ora10/oui<br />
Log file location : /oracle/ora10/cfgtoollogs/opatch/opatch2009-01-15_17-00-51PM.log</p>
<p>Patch history file: /oracle/ora10/cfgtoollogs/opatch/opatch_history.txt</p>
<p>Invoking utility &#8220;cleanup&#8221;<br />
OPatch will clean up &#8216;restore.sh,make.txt&#8217; files and &#8216;rac,scratch,backup&#8217; directories.<br />
You will be still able to rollback patches after this cleanup.<br />
Do you want to proceed? [y|n]<br />
y<br />
User Responded with: Y<br />
Size of directory &#8220;/oracle/ora10/.patch_storage&#8221; before cleanup is 4575330012 bytes.<br />
Size of directory &#8220;/oracle/ora10/.patch_storage&#8221; after cleanup is 188326505 bytes.</p>
<p>UtilSession: Backup area for restore has been cleaned up. For a complete list of files/directories<br />
deleted, Please refer log file.</p>
<p>OPatch succeeded.</p></blockquote>
<p>180 MB instead of 4 GB. I like that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ora-solutions.net/web/2009/01/15/huge-space-consumption-by-oracle_homepatch_storage/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
