<?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/"
		>
<channel>
	<title>Comments on: Session-level statspack</title>
	<atom:link href="http://blog.tanelpoder.com/2007/06/24/session-level-statspack/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tanelpoder.com/2007/06/24/session-level-statspack/</link>
	<description>Oracle troubleshooting, internals and performance tuning</description>
	<lastBuildDate>Mon, 15 Mar 2010 01:50:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: tanelp</title>
		<link>http://blog.tanelpoder.com/2007/06/24/session-level-statspack/comment-page-1/#comment-94</link>
		<dc:creator>tanelp</dc:creator>
		<pubDate>Wed, 01 Oct 2008 01:34:03 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/24/session-level-statspack/#comment-94</guid>
		<description>Hi Peter,

Yep the sawr$sess_event_delta should not be there anymore. This synonyms is a bug (and fixed in latest sesspack version). I&#039;ll blog it soon.</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>Yep the sawr$sess_event_delta should not be there anymore. This synonyms is a bug (and fixed in latest sesspack version). I&#8217;ll blog it soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://blog.tanelpoder.com/2007/06/24/session-level-statspack/comment-page-1/#comment-93</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Tue, 30 Sep 2008 06:18:53 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/24/session-level-statspack/#comment-93</guid>
		<description>hi Tanel,

I&#039;m trying to install Sesspack 0.05 - I got it from the Hotsos Symposium 2008 download back in March.

It includes a synonym for sawr$sess_event_delta.  But this view does not seem to be present in the install_sesspack_schema script in version 0.05 (it was there in 0.04).  Do I need that view for  0.05?

br
peter</description>
		<content:encoded><![CDATA[<p>hi Tanel,</p>
<p>I&#8217;m trying to install Sesspack 0.05 &#8211; I got it from the Hotsos Symposium 2008 download back in March.</p>
<p>It includes a synonym for sawr$sess_event_delta.  But this view does not seem to be present in the install_sesspack_schema script in version 0.05 (it was there in 0.04).  Do I need that view for  0.05?</p>
<p>br<br />
peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanelp</title>
		<link>http://blog.tanelpoder.com/2007/06/24/session-level-statspack/comment-page-1/#comment-95</link>
		<dc:creator>tanelp</dc:creator>
		<pubDate>Fri, 08 Feb 2008 08:20:10 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/24/session-level-statspack/#comment-95</guid>
		<description>Hi Peter,

Yes, you&#039;re right. Had the waits been for a previous cursor, we should have seen an EXEC# 25 or FETCH# 25 line after those waits, before PARSING IN.

My first hunch was that this may be due auditing (insert into AUD$ or FGA_LOG$), but audit inserts should have been executed through a separate, recursive cursor.

So what were those obj#&#039;s seein in waits referring to? Were those normal tables/indexes?

Can you reproduce this issue at will? If yes and if you happen to be on Solaris 10, I can give you a DTrace script which dumps the process stack when it waits for buffer busy waits or enq TX: index contention.

This would give definitive proof on what caused those waits.</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>Yes, you&#8217;re right. Had the waits been for a previous cursor, we should have seen an EXEC# 25 or FETCH# 25 line after those waits, before PARSING IN.</p>
<p>My first hunch was that this may be due auditing (insert into AUD$ or FGA_LOG$), but audit inserts should have been executed through a separate, recursive cursor.</p>
<p>So what were those obj#&#8217;s seein in waits referring to? Were those normal tables/indexes?</p>
<p>Can you reproduce this issue at will? If yes and if you happen to be on Solaris 10, I can give you a DTrace script which dumps the process stack when it waits for buffer busy waits or enq TX: index contention.</p>
<p>This would give definitive proof on what caused those waits.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://blog.tanelpoder.com/2007/06/24/session-level-statspack/comment-page-1/#comment-96</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Fri, 01 Feb 2008 08:31:21 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/24/session-level-statspack/#comment-96</guid>
		<description>The trace file does not contain a cursor #25 prior to the one shown (and I&#039;m pretty sure that it doesnt come from anywhere else). My interpretation was based on Cary Millsap&#039;s advice that :

&quot;WAIT lines appear in the trace data before the database call that motivated
them. This occurs because the Oracle kernel emits lines into the trace file as events
complete.&quot;

Therefore, my interpretation is that EXECUTE database call begins for the INSERT (Cursor#25) and  results ine WAITS on enq:TX and buffer busy waits.  Only then is the data about cursor#25 output to the trace file.

Here is a more complete extract from the file(i&#039;ve changed the names of the database objects):

WAIT #0: nam=&#039;SQL*Net message to client&#039; ela= 2 driver id=1952673792 #bytes=1 p3=0 obj#=315994 tim=3273173063439
WAIT #0: nam=&#039;SQL*Net message from client&#039; ela= 1566 driver id=1952673792 #bytes=1 p3=0 obj#=315994 tim=3273173065090
WAIT #0: nam=&#039;SQL*Net message to client&#039; ela= 2 driver id=1952673792 #bytes=1 p3=0 obj#=315994 tim=3273173065421
WAIT #0: nam=&#039;SQL*Net message from client&#039; ela= 833 driver id=1952673792 #bytes=1 p3=0 obj#=315994 tim=3273173066319
=====================
PARSING IN CURSOR #24 len=637 dep=1 uid=47 oct=3 lid=47 tim=3273173073507 hv=1331493982 ad=&#039;57c2a718&#039;
SELECT * FROM TABLE1 WHERE SOME_ID= :B1 FOR UPDATE
END OF STMT
EXEC #24:c=10000,e=4731,p=0,cr=31,cu=4,mis=0,r=0,dep=1,og=1,tim=3273173073489
FETCH #24:c=0,e=1553,p=0,cr=8,cu=0,mis=0,r=1,dep=1,og=1,tim=3273173077198
=====================
PARSING IN CURSOR #15 len=431 dep=1 uid=47 oct=3 lid=47 tim=3273173078097 hv=604810361 ad=&#039;6b4deb48&#039;
SELECT COUNT(*) FROM ( SELECT SOME_STUFF_FROM SOME_TABLES)
END OF STMT
EXEC #15:c=0,e=503,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,tim=3273173078085
FETCH #15:c=0,e=1384,p=0,cr=19,cu=0,mis=0,r=1,dep=1,og=1,tim=3273173079686
WAIT #25: nam=&#039;enq: TX - index contention&#039; ela= 6 name&#124;mode=1415053316 usn&lt;&lt;16 &#124; slot=2555913 sequence=228627 obj#=315994 tim=3273173081540
WAIT #25: nam=&#039;enq: TX - index contention&#039; ela= 77446 name&#124;mode=1415053316 usn&lt;&lt;16 &#124; slot=2555913 sequence=228627 obj#=315994 tim=3273173159130
WAIT #25: nam=&#039;buffer busy waits&#039; ela= 1109 file#=198 block#=742607 class#=1 obj#=315242 tim=3273173160444
WAIT #25: nam=&#039;enq: TX - index contention&#039; ela= 8415 name&#124;mode=1415053316 usn&lt;&lt;16 &#124; slot=7602197 sequence=227627 obj#=315242 tim=3273173169242
WAIT #25: nam=&#039;buffer busy waits&#039; ela= 3668 file#=198 block#=742607 class#=1 obj#=315242 tim=3273173173017
=====================
PARSING IN CURSOR #25 len=250 dep=1 uid=47 oct=2 lid=47 tim=3273173173513 hv=3689280581 ad=&#039;57c2b178&#039;
INSERT INTO TABLE_2 RETURNING A_COLUMN INTO :O0
END OF STMT
EXEC #25:c=0,e=93457,p=0,cr=11,cu=39,mis=0,r=1,dep=1,og=1,tim=3273173173484
FETCH #24:c=0,e=101,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=1,tim=3273173173976
FETCH #24:c=0,e=31,p=0,cr=1,cu=0,mis=0,r=0,dep=1,og=1,tim=3273173174119
=====================</description>
		<content:encoded><![CDATA[<p>The trace file does not contain a cursor #25 prior to the one shown (and I&#8217;m pretty sure that it doesnt come from anywhere else). My interpretation was based on Cary Millsap&#8217;s advice that :</p>
<p>&#8220;WAIT lines appear in the trace data before the database call that motivated<br />
them. This occurs because the Oracle kernel emits lines into the trace file as events<br />
complete.&#8221;</p>
<p>Therefore, my interpretation is that EXECUTE database call begins for the INSERT (Cursor#25) and  results ine WAITS on enq:TX and buffer busy waits.  Only then is the data about cursor#25 output to the trace file.</p>
<p>Here is a more complete extract from the file(i&#8217;ve changed the names of the database objects):</p>
<p>WAIT #0: nam=&#8217;SQL*Net message to client&#8217; ela= 2 driver id=1952673792 #bytes=1 p3=0 obj#=315994 tim=3273173063439<br />
WAIT #0: nam=&#8217;SQL*Net message from client&#8217; ela= 1566 driver id=1952673792 #bytes=1 p3=0 obj#=315994 tim=3273173065090<br />
WAIT #0: nam=&#8217;SQL*Net message to client&#8217; ela= 2 driver id=1952673792 #bytes=1 p3=0 obj#=315994 tim=3273173065421<br />
WAIT #0: nam=&#8217;SQL*Net message from client&#8217; ela= 833 driver id=1952673792 #bytes=1 p3=0 obj#=315994 tim=3273173066319<br />
=====================<br />
PARSING IN CURSOR #24 len=637 dep=1 uid=47 oct=3 lid=47 tim=3273173073507 hv=1331493982 ad=&#8217;57c2a718&#8242;<br />
SELECT * FROM TABLE1 WHERE SOME_ID= :B1 FOR UPDATE<br />
END OF STMT<br />
EXEC #24:c=10000,e=4731,p=0,cr=31,cu=4,mis=0,r=0,dep=1,og=1,tim=3273173073489<br />
FETCH #24:c=0,e=1553,p=0,cr=8,cu=0,mis=0,r=1,dep=1,og=1,tim=3273173077198<br />
=====================<br />
PARSING IN CURSOR #15 len=431 dep=1 uid=47 oct=3 lid=47 tim=3273173078097 hv=604810361 ad=&#8217;6b4deb48&#8242;<br />
SELECT COUNT(*) FROM ( SELECT SOME_STUFF_FROM SOME_TABLES)<br />
END OF STMT<br />
EXEC #15:c=0,e=503,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,tim=3273173078085<br />
FETCH #15:c=0,e=1384,p=0,cr=19,cu=0,mis=0,r=1,dep=1,og=1,tim=3273173079686<br />
WAIT #25: nam=&#8217;enq: TX &#8211; index contention&#8217; ela= 6 name|mode=1415053316 usn&lt;&lt;16 | slot=2555913 sequence=228627 obj#=315994 tim=3273173081540<br />
WAIT #25: nam=&#8217;enq: TX &#8211; index contention&#8217; ela= 77446 name|mode=1415053316 usn&lt;&lt;16 | slot=2555913 sequence=228627 obj#=315994 tim=3273173159130<br />
WAIT #25: nam=&#8217;buffer busy waits&#8217; ela= 1109 file#=198 block#=742607 class#=1 obj#=315242 tim=3273173160444<br />
WAIT #25: nam=&#8217;enq: TX &#8211; index contention&#8217; ela= 8415 name|mode=1415053316 usn&lt;&lt;16 | slot=7602197 sequence=227627 obj#=315242 tim=3273173169242<br />
WAIT #25: nam=&#8217;buffer busy waits&#8217; ela= 3668 file#=198 block#=742607 class#=1 obj#=315242 tim=3273173173017<br />
=====================<br />
PARSING IN CURSOR #25 len=250 dep=1 uid=47 oct=2 lid=47 tim=3273173173513 hv=3689280581 ad=&#8217;57c2b178&#8242;<br />
INSERT INTO TABLE_2 RETURNING A_COLUMN INTO :O0<br />
END OF STMT<br />
EXEC #25:c=0,e=93457,p=0,cr=11,cu=39,mis=0,r=1,dep=1,og=1,tim=3273173173484<br />
FETCH #24:c=0,e=101,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=1,tim=3273173173976<br />
FETCH #24:c=0,e=31,p=0,cr=1,cu=0,mis=0,r=0,dep=1,og=1,tim=3273173174119<br />
=====================</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanelp</title>
		<link>http://blog.tanelpoder.com/2007/06/24/session-level-statspack/comment-page-1/#comment-91</link>
		<dc:creator>tanelp</dc:creator>
		<pubDate>Thu, 31 Jan 2008 13:15:10 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/24/session-level-statspack/#comment-91</guid>
		<description>Nope, the cursor #25 you see above is some other cursor, not the insert. The new insert statement was then parsed and reused cursor slot #25 (as apparently the previous slot #25 occupier was closed).

So search upwards in your tracefile for PARSING IN CURSOR #25 and the match you hit first is the statement that caused those waits.</description>
		<content:encoded><![CDATA[<p>Nope, the cursor #25 you see above is some other cursor, not the insert. The new insert statement was then parsed and reused cursor slot #25 (as apparently the previous slot #25 occupier was closed).</p>
<p>So search upwards in your tracefile for PARSING IN CURSOR #25 and the match you hit first is the statement that caused those waits.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://blog.tanelpoder.com/2007/06/24/session-level-statspack/comment-page-1/#comment-90</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Thu, 31 Jan 2008 09:28:47 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/24/session-level-statspack/#comment-90</guid>
		<description>I guess my assumption about obj# must be wrong (?)

sorry to bother you !</description>
		<content:encoded><![CDATA[<p>I guess my assumption about obj# must be wrong (?)</p>
<p>sorry to bother you !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://blog.tanelpoder.com/2007/06/24/session-level-statspack/comment-page-1/#comment-89</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Thu, 31 Jan 2008 09:19:43 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/24/session-level-statspack/#comment-89</guid>
		<description>ok. This is a bit cheeky to ask another question so feel free not to reply !!

But, I now have some raw trace file data related to this issue, that I&#039;m unsure of.

First of all, 2 of the WAIT lines (emitted before an insert) report enq:TX index contention on a different table/index to that being inserted.  That index is in a different tablespace and segment to the table being inserted into.  Therefore, Im confused why this session has to wait on it.

EXEC #15:c=0,e=503,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,tim=3273173078085
FETCH #15:c=0,e=1384,p=0,cr=19,cu=0,mis=0,r=1,dep=1,og=1,tim=3273173079686
WAIT #25: nam=&#039;enq: TX - index contention&#039; ela= 6 name&#124;mode=1415053316 usn&lt;&lt;16 &#124; slot=2555913 sequence=228627 obj#=315994 tim=3273173081540
WAIT #25: nam=&#039;enq: TX - index contention&#039; ela= 77446 name&#124;mode=1415053316 usn&lt;&lt;16 &#124; slot=2555913 sequence=228627 obj#=315994 tim=3273173159130
WAIT #25: nam=&#039;buffer busy waits&#039; ela= 1109 file#=198 block#=742607 class#=1 obj#=315242 tim=3273173160444
WAIT #25: nam=&#039;enq: TX - index contention&#039; ela= 8415 name&#124;mode=1415053316 usn&lt;&lt;16 &#124; slot=7602197 sequence=227627 obj#=315242 tim=3273173169242
WAIT #25: nam=&#039;buffer busy waits&#039; ela= 3668 file#=198 block#=742607 class#=1 obj#=315242 tim=3273173173017
=====================
PARSING IN CURSOR #25 len=250 dep=1 uid=47 oct=2 lid=47 tim=3273173173513 hv=3689280581 ad=&#039;57c2b178&#039;
INSERT INTO SOME_TABLE

(I&#039;m assuming that the obj# reported in the WAIT line refers to the object_id in dba_objects)

br
peter</description>
		<content:encoded><![CDATA[<p>ok. This is a bit cheeky to ask another question so feel free not to reply !!</p>
<p>But, I now have some raw trace file data related to this issue, that I&#8217;m unsure of.</p>
<p>First of all, 2 of the WAIT lines (emitted before an insert) report enq:TX index contention on a different table/index to that being inserted.  That index is in a different tablespace and segment to the table being inserted into.  Therefore, Im confused why this session has to wait on it.</p>
<p>EXEC #15:c=0,e=503,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,tim=3273173078085<br />
FETCH #15:c=0,e=1384,p=0,cr=19,cu=0,mis=0,r=1,dep=1,og=1,tim=3273173079686<br />
WAIT #25: nam=&#8217;enq: TX &#8211; index contention&#8217; ela= 6 name|mode=1415053316 usn&lt;&lt;16 | slot=2555913 sequence=228627 obj#=315994 tim=3273173081540<br />
WAIT #25: nam=&#8217;enq: TX &#8211; index contention&#8217; ela= 77446 name|mode=1415053316 usn&lt;&lt;16 | slot=2555913 sequence=228627 obj#=315994 tim=3273173159130<br />
WAIT #25: nam=&#8217;buffer busy waits&#8217; ela= 1109 file#=198 block#=742607 class#=1 obj#=315242 tim=3273173160444<br />
WAIT #25: nam=&#8217;enq: TX &#8211; index contention&#8217; ela= 8415 name|mode=1415053316 usn&lt;&lt;16 | slot=7602197 sequence=227627 obj#=315242 tim=3273173169242<br />
WAIT #25: nam=&#8217;buffer busy waits&#8217; ela= 3668 file#=198 block#=742607 class#=1 obj#=315242 tim=3273173173017<br />
=====================<br />
PARSING IN CURSOR #25 len=250 dep=1 uid=47 oct=2 lid=47 tim=3273173173513 hv=3689280581 ad=&#8217;57c2b178&#8242;<br />
INSERT INTO SOME_TABLE</p>
<p>(I&#8217;m assuming that the obj# reported in the WAIT line refers to the object_id in dba_objects)</p>
<p>br<br />
peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanelp</title>
		<link>http://blog.tanelpoder.com/2007/06/24/session-level-statspack/comment-page-1/#comment-88</link>
		<dc:creator>tanelp</dc:creator>
		<pubDate>Wed, 30 Jan 2008 14:20:12 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/24/session-level-statspack/#comment-88</guid>
		<description>Hi Peter,

The unaccounted time is likely one of the following:

1) Time spent waiting in CPU runqueue (Oracle thinks the process is on CPU and has stopped measuring wait time - but really the process is waiting in CPU runqueue, thus OS is not accounting any CPU time for the process either)

2) CPU Time not accounted due quantization error (as normally the CPU usage is measured once every tick and attributed to the process currently happening to be on the CPU)

3) Wait time not accounted a bug</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>The unaccounted time is likely one of the following:</p>
<p>1) Time spent waiting in CPU runqueue (Oracle thinks the process is on CPU and has stopped measuring wait time &#8211; but really the process is waiting in CPU runqueue, thus OS is not accounting any CPU time for the process either)</p>
<p>2) CPU Time not accounted due quantization error (as normally the CPU usage is measured once every tick and attributed to the process currently happening to be on the CPU)</p>
<p>3) Wait time not accounted a bug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://blog.tanelpoder.com/2007/06/24/session-level-statspack/comment-page-1/#comment-87</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Wed, 30 Jan 2008 07:41:19 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/24/session-level-statspack/#comment-87</guid>
		<description>Hi Tanel,

Not quite the same topic but I thought you might have some ideas.

I am trying assemble a report about  recent performance problems in our system.

I am looking at V$SQL to get a breakdown of wait time contributions to ELAPSED_TIME for some SQL statements using the

User_IO_Wait_Time,
Application_wait_time,
Concurrency_Wait_time,
PLSQL_Execution_Wait_time,
CPU_Time

columns.  But there is always a percentage not accounted for by these columns. Could you suggest possible reasons for this unaccounted time?

I realise using V$ views is not ideal for this kind of task but its all I have (in the absence of properly scoped trace file data) now (the performance problem was fixed)</description>
		<content:encoded><![CDATA[<p>Hi Tanel,</p>
<p>Not quite the same topic but I thought you might have some ideas.</p>
<p>I am trying assemble a report about  recent performance problems in our system.</p>
<p>I am looking at V$SQL to get a breakdown of wait time contributions to ELAPSED_TIME for some SQL statements using the</p>
<p>User_IO_Wait_Time,<br />
Application_wait_time,<br />
Concurrency_Wait_time,<br />
PLSQL_Execution_Wait_time,<br />
CPU_Time</p>
<p>columns.  But there is always a percentage not accounted for by these columns. Could you suggest possible reasons for this unaccounted time?</p>
<p>I realise using V$ views is not ideal for this kind of task but its all I have (in the absence of properly scoped trace file data) now (the performance problem was fixed)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lscheng</title>
		<link>http://blog.tanelpoder.com/2007/06/24/session-level-statspack/comment-page-1/#comment-86</link>
		<dc:creator>lscheng</dc:creator>
		<pubDate>Mon, 20 Aug 2007 20:07:52 +0000</pubDate>
		<guid isPermaLink="false">http://tanelpoder.wordpress.com/2007/06/24/session-level-statspack/#comment-86</guid>
		<description>Btw which one is better:
Oracle Session Snapper
or sesspack :-P

Cheers

--
LSC</description>
		<content:encoded><![CDATA[<p>Btw which one is better:<br />
Oracle Session Snapper<br />
or sesspack :-P</p>
<p>Cheers</p>
<p>&#8211;<br />
LSC</p>
]]></content:encoded>
	</item>
</channel>
</rss>
