<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Parse Calls</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Sat, 18 May 2013 11:04:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: eagle&#8217;s home &#187; 11203的parse count(total)中不包含softer soft parse</title>
		<link>http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-51652</link>
		<dc:creator><![CDATA[eagle&#8217;s home &#187; 11203的parse count(total)中不包含softer soft parse]]></dc:creator>
		<pubDate>Tue, 27 Nov 2012 06:30:22 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-51652</guid>
		<description><![CDATA[[...] Jonathan Lewis在07年的一篇文章Parse Calls中详细介绍了parse相关的一些statistics. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Jonathan Lewis在07年的一篇文章Parse Calls中详细介绍了parse相关的一些statistics. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xpchild &#187; analysing statspack 8</title>
		<link>http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-43211</link>
		<dc:creator><![CDATA[xpchild &#187; analysing statspack 8]]></dc:creator>
		<pubDate>Fri, 16 Dec 2011 08:16:56 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-43211</guid>
		<description><![CDATA[[...] objects“相对比”library cache latch“要大。这可能是过度的优化的指示(a.k.a. “hard” parsing)，但是因为没有太多的hard [...]]]></description>
		<content:encoded><![CDATA[<p>[...] objects“相对比”library cache latch“要大。这可能是过度的优化的指示(a.k.a. “hard” parsing)，但是因为没有太多的hard [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Book Review: Oracle Database 11g Performance Tuning Recipes &#171; Charles Hooper&#039;s Oracle Notes</title>
		<link>http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-41678</link>
		<dc:creator><![CDATA[Book Review: Oracle Database 11g Performance Tuning Recipes &#171; Charles Hooper&#039;s Oracle Notes]]></dc:creator>
		<pubDate>Sat, 10 Sep 2011 21:14:35 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-41678</guid>
		<description><![CDATA[[...] found in the PGA memory in dedicated server mode and in the SGA in shared server mode (reference1 reference2 from one of the references: “Every individiual holding a cursor open has an entry in x$kgllk – [...]]]></description>
		<content:encoded><![CDATA[<p>[...] found in the PGA memory in dedicated server mode and in the SGA in shared server mode (reference1 reference2 from one of the references: “Every individiual holding a cursor open has an entry in x$kgllk – [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SESSION_CACHED_CURSORS &#8211; Possibly Interesting Details &#171; Charles Hooper&#039;s Oracle Notes</title>
		<link>http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-41045</link>
		<dc:creator><![CDATA[SESSION_CACHED_CURSORS &#8211; Possibly Interesting Details &#171; Charles Hooper&#039;s Oracle Notes]]></dc:creator>
		<pubDate>Thu, 21 Jul 2011 06:01:54 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-41045</guid>
		<description><![CDATA[[...] Blog article written by Jonathan Lewis, specifically this comment: &#8220;Every individiual holding a cursor open has an entry in x$kgllk – which is in the SGA – and these entries seem to be 172 bytes long in 10g (152 in 9i). So, clearly, if you hold more cursors open, you will be using more memory for these structures.&#8221; [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Blog article written by Jonathan Lewis, specifically this comment: &#8220;Every individiual holding a cursor open has an entry in x$kgllk – which is in the SGA – and these entries seem to be 172 bytes long in 10g (152 in 9i). So, clearly, if you hold more cursors open, you will be using more memory for these structures.&#8221; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-39822</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 03 Mar 2011 18:04:35 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-39822</guid>
		<description><![CDATA[Martin,
So we do have a change in behaviour. 
It&#039;s probably worth linking to &lt;a href=&quot;http://oracle-randolf.blogspot.com/2011/01/adaptive-cursor-sharing.html&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;&lt;strong&gt;this note on adaptive cursor sharing&lt;/strong&gt;&lt;/em&lt;/a&gt;&gt; and pl/sql by Randolf Geist - which also links to a Metalink (MOS) note. There may be some connections between the change we&#039;re seeing here and future directions for ACS.]]></description>
		<content:encoded><![CDATA[<p>Martin,<br />
So we do have a change in behaviour.<br />
It&#8217;s probably worth linking to <a href="http://oracle-randolf.blogspot.com/2011/01/adaptive-cursor-sharing.html" rel="nofollow"><em><strong>this note on adaptive cursor sharing</strong>&lt;/em</em></a>&gt; and pl/sql by Randolf Geist &#8211; which also links to a Metalink (MOS) note. There may be some connections between the change we&#8217;re seeing here and future directions for ACS.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Maletinsky</title>
		<link>http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-39817</link>
		<dc:creator><![CDATA[Martin Maletinsky]]></dc:creator>
		<pubDate>Thu, 03 Mar 2011 10:36:57 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-39817</guid>
		<description><![CDATA[Hello Jonathan,

I do not observe this behaviour with Oracle version 10.2. In fact with the test scenario described above I get the following output in the observing session:
[sourcecode]
K.AF090D.AVALOQ&gt; select name.name, stat.value
  2   from v$sesstat    stat
  3       ,v$statname   name
  4  where  stat.statistic# = name.statistic#
  5    and  stat.sid = 266
  6    and  name.name in (&#039;parse count (hard)&#039;
  7                      ,&#039;parse count (total)&#039;
  8                      ,&#039;session cursor cache hits&#039;
  9                      ,&#039;session cursor cache count&#039;
 10                      ,&#039;opened cursors cumulative&#039;
 11                      ,&#039;opened cursors current&#039;
 12                      );

NAME                                                                  VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative                                               138
opened cursors current                                                   44
session cursor cache hits                                                28
session cursor cache count                                               39
parse count (total)                                                     137
parse count (hard)                                                        5

6 rows selected.

K.AF090D.AVALOQ&gt;
K.AF090D.AVALOQ&gt; -- AFTER THE LOOP HAS BEEN EXECUTED IN SESSION 266
K.AF090D.AVALOQ&gt; /

NAME                                                                  VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative                                               145
opened cursors current                                                   45
session cursor cache hits                                                29
session cursor cache count                                               41
parse count (total)                                                     142
parse count (hard)                                                        7

6 rows selected.

K.AF090D.AVALOQ&gt; select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for HPUX: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

5 rows selected.

K.AF090D.AVALOQ&gt;
[/sourcecode]
]]></description>
		<content:encoded><![CDATA[<p>Hello Jonathan,</p>
<p>I do not observe this behaviour with Oracle version 10.2. In fact with the test scenario described above I get the following output in the observing session:</p>
<pre class="brush: plain; title: ; notranslate">
K.AF090D.AVALOQ&gt; select name.name, stat.value
  2   from v$sesstat    stat
  3       ,v$statname   name
  4  where  stat.statistic# = name.statistic#
  5    and  stat.sid = 266
  6    and  name.name in ('parse count (hard)'
  7                      ,'parse count (total)'
  8                      ,'session cursor cache hits'
  9                      ,'session cursor cache count'
 10                      ,'opened cursors cumulative'
 11                      ,'opened cursors current'
 12                      );

NAME                                                                  VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative                                               138
opened cursors current                                                   44
session cursor cache hits                                                28
session cursor cache count                                               39
parse count (total)                                                     137
parse count (hard)                                                        5

6 rows selected.

K.AF090D.AVALOQ&gt;
K.AF090D.AVALOQ&gt; -- AFTER THE LOOP HAS BEEN EXECUTED IN SESSION 266
K.AF090D.AVALOQ&gt; /

NAME                                                                  VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative                                               145
opened cursors current                                                   45
session cursor cache hits                                                29
session cursor cache count                                               41
parse count (total)                                                     142
parse count (hard)                                                        7

6 rows selected.

K.AF090D.AVALOQ&gt; select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for HPUX: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

5 rows selected.

K.AF090D.AVALOQ&gt;
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-39815</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 03 Mar 2011 10:02:07 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-39815</guid>
		<description><![CDATA[Martin,

Thanks for the post.

The first thing to do, of course, is to run your test against 10g and see if similar results appear. I did a quick check with some similar code against a 10.2.0.3 instance and didn&#039;t see the session cursor cache hits that you report.

It&#039;s possible, therefore, that the 11g code has done something to re-route the hits on the pl/sql cursor cache (which is what your code is using) through the code that handles the session cursor cache, or it may simply be counting pl/sql cursor cache hits as session cursor cache hits.

It&#039;s possible that the cause of the anomaly reported in comments 22 and 23 is now universal, it&#039;s possible that there are two different factors at play. It&#039;s something that will need further investigation.]]></description>
		<content:encoded><![CDATA[<p>Martin,</p>
<p>Thanks for the post.</p>
<p>The first thing to do, of course, is to run your test against 10g and see if similar results appear. I did a quick check with some similar code against a 10.2.0.3 instance and didn&#8217;t see the session cursor cache hits that you report.</p>
<p>It&#8217;s possible, therefore, that the 11g code has done something to re-route the hits on the pl/sql cursor cache (which is what your code is using) through the code that handles the session cursor cache, or it may simply be counting pl/sql cursor cache hits as session cursor cache hits.</p>
<p>It&#8217;s possible that the cause of the anomaly reported in comments 22 and 23 is now universal, it&#8217;s possible that there are two different factors at play. It&#8217;s something that will need further investigation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Maletinsky</title>
		<link>http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-39793</link>
		<dc:creator><![CDATA[Martin Maletinsky]]></dc:creator>
		<pubDate>Tue, 01 Mar 2011 16:35:42 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-39793</guid>
		<description><![CDATA[Addon to my previous post:

I just noticed that entry 22./23. address a similar topic (for Oracle 10.2). However, I am still not sure about which actions are accounted for in the statistics “session cursor cache hits” and “parse count (total)” and if there is an overlap (i.e. actions that increase both counters) or if the counters (for Oracle 10.2, 11g) refer to completely distinct actions.

kind regards
Martin]]></description>
		<content:encoded><![CDATA[<p>Addon to my previous post:</p>
<p>I just noticed that entry 22./23. address a similar topic (for Oracle 10.2). However, I am still not sure about which actions are accounted for in the statistics “session cursor cache hits” and “parse count (total)” and if there is an overlap (i.e. actions that increase both counters) or if the counters (for Oracle 10.2, 11g) refer to completely distinct actions.</p>
<p>kind regards<br />
Martin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Maletinsky</title>
		<link>http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-39792</link>
		<dc:creator><![CDATA[Martin Maletinsky]]></dc:creator>
		<pubDate>Tue, 01 Mar 2011 16:28:41 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-39792</guid>
		<description><![CDATA[Hello Jonathan,

Motivated by this article, I did some experiments. On Oracle 11g I noticed, that the &quot;session cursor cache hits&quot; value can be larger than the &quot;parse count (total)&quot; value (see the test case below). From what you write in the above summary (&quot;if the statement has been seen and authenticated before and has a reference in the session cursor cache then the ‘parse call’ may do virtually nothing &quot;) I understood, that &quot;session cursor cache hits&quot; should also be accounted for in &quot;parse count (total)&quot;. Also with respect to the &quot;session cursor cache hits&quot;, the Oracle Reference says &quot;...Subtract this statistic from &quot;parse count (total)&quot; to determine the real number of parses that occurred&quot;, from which I conclude that the &quot;parse count (total)&quot; value should be &gt;= the &quot;session cursor cache hits&quot; value. Did I maybe misunderstand something concerning these statistics or do you have an explanation for my observation?

thanks a lot for your help
kind regards
Martin
[sourcecode]
Test scenario
=============

Preparation
-----------

create table mma_test(id number(9));



Perform parses / session cursor cache lookups in Session 1
-----------------------------------------------------------

K.AF080C.AVALOQ&gt; select distinct sid from v$mystat;

       SID
----------
       317

1 row selected.

K.AF080C.AVALOQ&gt; begin
  2    for i in 1..4000 loop
  3      insert /*+ test_ins2 Schleife */ into mma_test values (33);
  4    end loop;
  5  end;
  6  /

PL/SQL procedure successfully completed.


Monitor statistics in Session 2
-------------------------------
K.AF080C.AVALOQ&gt;
K.AF080C.AVALOQ&gt;
K.AF080C.AVALOQ&gt;
K.AF080C.AVALOQ&gt; select name.name, stat.value
  2    from v$sesstat    stat
  3        ,v$statname   name
  4   where  stat.statistic# = name.statistic#
  5     and  stat.sid = 317
  6     and  name.name in (&#039;parse count (hard)&#039;
  7                       ,&#039;parse count (total)&#039;
  8                       ,&#039;session cursor cache hits&#039;
  9                       ,&#039;session cursor cache count&#039;
 10                       ,&#039;opened cursors cumulative&#039;
 11                       ,&#039;opened cursors current&#039;
 12                       );

NAME                                                                  VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative                                               191
opened cursors current                                                    3
session cursor cache hits                                                80
session cursor cache count                                              108
parse count (total)                                                     135
parse count (hard)                                                        0

6 rows selected.

K.AF080C.AVALOQ&gt; -- AFTER THE LOOP HAS BEEN EXECUTED IN SESSION 317
K.AF080C.AVALOQ&gt; /

NAME                                                                  VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative                                              4199
opened cursors current                                                    3
session cursor cache hits                                              4083
session cursor cache count                                              109
parse count (total)                                                     142
parse count (hard)                                                        1

6 rows selected.

K.AF080C.AVALOQ&gt;
[/sourcecode]]]></description>
		<content:encoded><![CDATA[<p>Hello Jonathan,</p>
<p>Motivated by this article, I did some experiments. On Oracle 11g I noticed, that the &#8220;session cursor cache hits&#8221; value can be larger than the &#8220;parse count (total)&#8221; value (see the test case below). From what you write in the above summary (&#8220;if the statement has been seen and authenticated before and has a reference in the session cursor cache then the ‘parse call’ may do virtually nothing &#8220;) I understood, that &#8220;session cursor cache hits&#8221; should also be accounted for in &#8220;parse count (total)&#8221;. Also with respect to the &#8220;session cursor cache hits&#8221;, the Oracle Reference says &#8220;&#8230;Subtract this statistic from &#8220;parse count (total)&#8221; to determine the real number of parses that occurred&#8221;, from which I conclude that the &#8220;parse count (total)&#8221; value should be &gt;= the &#8220;session cursor cache hits&#8221; value. Did I maybe misunderstand something concerning these statistics or do you have an explanation for my observation?</p>
<p>thanks a lot for your help<br />
kind regards<br />
Martin</p>
<pre class="brush: plain; title: ; notranslate">
Test scenario
=============

Preparation
-----------

create table mma_test(id number(9));



Perform parses / session cursor cache lookups in Session 1
-----------------------------------------------------------

K.AF080C.AVALOQ&gt; select distinct sid from v$mystat;

       SID
----------
       317

1 row selected.

K.AF080C.AVALOQ&gt; begin
  2    for i in 1..4000 loop
  3      insert /*+ test_ins2 Schleife */ into mma_test values (33);
  4    end loop;
  5  end;
  6  /

PL/SQL procedure successfully completed.


Monitor statistics in Session 2
-------------------------------
K.AF080C.AVALOQ&gt;
K.AF080C.AVALOQ&gt;
K.AF080C.AVALOQ&gt;
K.AF080C.AVALOQ&gt; select name.name, stat.value
  2    from v$sesstat    stat
  3        ,v$statname   name
  4   where  stat.statistic# = name.statistic#
  5     and  stat.sid = 317
  6     and  name.name in ('parse count (hard)'
  7                       ,'parse count (total)'
  8                       ,'session cursor cache hits'
  9                       ,'session cursor cache count'
 10                       ,'opened cursors cumulative'
 11                       ,'opened cursors current'
 12                       );

NAME                                                                  VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative                                               191
opened cursors current                                                    3
session cursor cache hits                                                80
session cursor cache count                                              108
parse count (total)                                                     135
parse count (hard)                                                        0

6 rows selected.

K.AF080C.AVALOQ&gt; -- AFTER THE LOOP HAS BEEN EXECUTED IN SESSION 317
K.AF080C.AVALOQ&gt; /

NAME                                                                  VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative                                              4199
opened cursors current                                                    3
session cursor cache hits                                              4083
session cursor cache count                                              109
parse count (total)                                                     142
parse count (hard)                                                        1

6 rows selected.

K.AF080C.AVALOQ&gt;
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oracle Clinic</title>
		<link>http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-37652</link>
		<dc:creator><![CDATA[Oracle Clinic]]></dc:creator>
		<pubDate>Tue, 02 Nov 2010 11:08:35 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/07/03/parse-calls/#comment-37652</guid>
		<description><![CDATA[&lt;strong&gt;Oracle中SQL解析的流程...&lt;/strong&gt;

Oracle中SQL解析的主要流程: 我们说的游标概念比较复杂，它可以是客户端程序中的游标，服务进程中的私有游标，以及服务器端共享池里的共享游标。假设一个游标被打开了，一般来说它的共享游标信息(包括执行计划，优化树等)总是会在SQL AREA里，无需再次软/硬解析。 SESSION_CACHED_CURSORS是Oracle中的一个初始化参数(修改必须重启实例)，指定了每个会话缓存的游标上限(保留在PGA中)；客户端程序中open cursor的要求仍会被传递给服务进程，服务进程首先扫描自身缓存的游...]]></description>
		<content:encoded><![CDATA[<p><strong>Oracle中SQL解析的流程&#8230;</strong></p>
<p>Oracle中SQL解析的主要流程: 我们说的游标概念比较复杂，它可以是客户端程序中的游标，服务进程中的私有游标，以及服务器端共享池里的共享游标。假设一个游标被打开了，一般来说它的共享游标信息(包括执行计划，优化树等)总是会在SQL AREA里，无需再次软/硬解析。 SESSION_CACHED_CURSORS是Oracle中的一个初始化参数(修改必须重启实例)，指定了每个会话缓存的游标上限(保留在PGA中)；客户端程序中open cursor的要求仍会被传递给服务进程，服务进程首先扫描自身缓存的游&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
