<?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: Executions in v$sql</title>
	<atom:link href="http://mrothouse.wordpress.com/2007/06/04/executions-in-vsql/feed/" rel="self" type="application/rss+xml" />
	<link>http://mrothouse.wordpress.com/2007/06/04/executions-in-vsql/</link>
	<description>Thoughts and notes about my IT and DBMS profession</description>
	<lastBuildDate>Fri, 06 Nov 2009 23:59:09 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ewan</title>
		<link>http://mrothouse.wordpress.com/2007/06/04/executions-in-vsql/#comment-4089</link>
		<dc:creator>Ewan</dc:creator>
		<pubDate>Tue, 05 Jun 2007 06:54:26 +0000</pubDate>
		<guid isPermaLink="false">http://mrothouse.wordpress.com/2007/06/04/executions-in-vsql/#comment-4089</guid>
		<description>The best way to get historical data in Oracle 9i is using statspack, which can be run on a scheduled basis then you build reports on the snaps later.

You can look at existing snaps by running the following command in sqlplus, it should list every existing statspack snap and let you choose to build a report between 2 times.

@?/rdbms/admin/spreport.sql

Otherwise, you can run this command in sqlplus to run a snap on demand, so you can run it, leave it 10 minutes, then run the same command again. 

exec statspack.snap();

Afterwards, you can run the spreport.sql and it will output a spool file full of details like memory usage, disk i/o usage, and includes the top SQL by executions, buffer get, and disk i/o between the times of the 2 snaps requested.</description>
		<content:encoded><![CDATA[<p>The best way to get historical data in Oracle 9i is using statspack, which can be run on a scheduled basis then you build reports on the snaps later.</p>
<p>You can look at existing snaps by running the following command in sqlplus, it should list every existing statspack snap and let you choose to build a report between 2 times.</p>
<p>@?/rdbms/admin/spreport.sql</p>
<p>Otherwise, you can run this command in sqlplus to run a snap on demand, so you can run it, leave it 10 minutes, then run the same command again. </p>
<p>exec statspack.snap();</p>
<p>Afterwards, you can run the spreport.sql and it will output a spool file full of details like memory usage, disk i/o usage, and includes the top SQL by executions, buffer get, and disk i/o between the times of the 2 snaps requested.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://mrothouse.wordpress.com/2007/06/04/executions-in-vsql/#comment-4065</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Tue, 05 Jun 2007 00:51:16 +0000</pubDate>
		<guid isPermaLink="false">http://mrothouse.wordpress.com/2007/06/04/executions-in-vsql/#comment-4065</guid>
		<description>Well for a start, I&#039;d be looking at ROWS_PROCESSED not executions as it is possible that you have a single update/insert/update/merge statement execution covering a lot of rows (and generating lots of redo). You could also ignore SELECT statements.
Also, if you can catch it while it is happening, you can use session statistics to identify the database session generating the most redo
SELECT sid,name,value 
FROM V$SESSTAT s, v$statname n 
WHERE n.statistic# = s.statistic# 
AND value &gt; 1000
AND name like &#039;%redo size%&#039;
ORDER BY sid,LOWER(name);</description>
		<content:encoded><![CDATA[<p>Well for a start, I&#8217;d be looking at ROWS_PROCESSED not executions as it is possible that you have a single update/insert/update/merge statement execution covering a lot of rows (and generating lots of redo). You could also ignore SELECT statements.<br />
Also, if you can catch it while it is happening, you can use session statistics to identify the database session generating the most redo<br />
SELECT sid,name,value<br />
FROM V$SESSTAT s, v$statname n<br />
WHERE n.statistic# = s.statistic#<br />
AND value &gt; 1000<br />
AND name like &#8216;%redo size%&#8217;<br />
ORDER BY sid,LOWER(name);</p>
]]></content:encoded>
	</item>
</channel>
</rss>
