<?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: Transactions</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2013/02/15/transactions/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2013/02/15/transactions/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Fri, 24 May 2013 13:27:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Transactions 2 &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/15/transactions/#comment-53608</link>
		<dc:creator><![CDATA[Transactions 2 &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Mon, 18 Feb 2013 07:54:47 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10589#comment-53608</guid>
		<description><![CDATA[[...] a little follow-on from Friday&#8217;s posting. I&#8217;ll start it off as a quiz, and follow up tomorrow with an explanation of the results [...]]]></description>
		<content:encoded><![CDATA[<p>[...] a little follow-on from Friday&#8217;s posting. I&#8217;ll start it off as a quiz, and follow up tomorrow with an explanation of the results [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/15/transactions/#comment-53606</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Mon, 18 Feb 2013 07:16:47 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10589#comment-53606</guid>
		<description><![CDATA[Valentin,

Thanks for the demonstration. I&#039;ve often wished that Oracle would introduce a &quot;fetch count&quot; statistic to match the parse count and execute count.  (Splitting recursive calls into sys-recursive and user-recursive would be nice as well).]]></description>
		<content:encoded><![CDATA[<p>Valentin,</p>
<p>Thanks for the demonstration. I&#8217;ve often wished that Oracle would introduce a &#8220;fetch count&#8221; statistic to match the parse count and execute count.  (Splitting recursive calls into sys-recursive and user-recursive would be nice as well).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/15/transactions/#comment-53605</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Mon, 18 Feb 2013 07:12:57 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10589#comment-53605</guid>
		<description><![CDATA[Lou,

To answer that question indirectly - which is the higher load: 1,000 transactions that update one row each, or 100 transactions that update 10 rows each ?

What if each type of transaction does a 10MB tablescan, what if the smaller transaction maintains 10 indexes per row, while the large transaction doesn&#039;t maintain any indexes ?

There are four or five key resources and measures that have different significance to different people. The same single measure will not be appropriate for everyone.]]></description>
		<content:encoded><![CDATA[<p>Lou,</p>
<p>To answer that question indirectly &#8211; which is the higher load: 1,000 transactions that update one row each, or 100 transactions that update 10 rows each ?</p>
<p>What if each type of transaction does a 10MB tablescan, what if the smaller transaction maintains 10 indexes per row, while the large transaction doesn&#8217;t maintain any indexes ?</p>
<p>There are four or five key resources and measures that have different significance to different people. The same single measure will not be appropriate for everyone.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Valentin Nikotin</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/15/transactions/#comment-53595</link>
		<dc:creator><![CDATA[Valentin Nikotin]]></dc:creator>
		<pubDate>Sun, 17 Feb 2013 07:06:49 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10589#comment-53595</guid>
		<description><![CDATA[Here is the simple code to check AWR reports and example for recursive calls counts :

[sourcecode language=&quot;SQL&quot; collapse=&quot;true&quot;]
[oracle@DB1 ~]$ cat tst.sql 
define row_cnt = &amp;1
define opt_lvl = &amp;2

exec dbms_workload_repository.create_snapshot;

alter session set plsql_optimize_level = &amp;opt_lvl;

begin
  for rec in (with a as (select null from dual connect by level &lt;= 1e5) select null from a,a where rownum &lt;= &amp;row_cnt) loop
    null;
  end loop; 
end;
/

exec dbms_workload_repository.create_snapshot;

define num_days = 1;
define  report_type  = &#039;text&#039;;
define  report_name  = &#039;&#039;;

column inst_num   new_value inst_num  format 99999;
column inst_name  new_value inst_name format a12;
column db_name    new_value db_name   format a12;
column dbid       new_value dbid      format 9999999999;

select d.dbid            dbid
     , d.name            db_name
     , i.instance_number inst_num
     , i.instance_name   inst_name
  from v$database d,
       v$instance i;

column begin_snap new_value begin_snap  format 99999;
column end_snap   new_value end_snap    format 99999;

select max(snap_id) end_snap, max(snap_id)-1 begin_snap from dba_hist_snapshot;

@@?/rdbms/admin/awrrpti

exit
[/sourcecode]

[sourcecode language=&quot;SQL&quot;]
[oracle@DB1 ~]$ sqlplus / as sysdba @tst 1000000 0 &#124; grep recursive
recursive calls                           1,001,075      156,736.3      91,006.8
recursive cpu usage                             467           73.1          42.5
[oracle@DB1 ~]$ sqlplus / as sysdba @tst 1000000 2 &#124; grep recursive
recursive calls                              11,053        9,264.9       1,004.8
recursive cpu usage                              92           77.1           8.4
[oracle@DB1 ~]$ sqlplus / as sysdba @tst 0 0 &#124; grep recursive
recursive calls                               1,084        1,358.4          98.6
recursive cpu usage                              58           72.7           5.3
[oracle@DB1 ~]$
[/sourcecode]]]></description>
		<content:encoded><![CDATA[<p>Here is the simple code to check AWR reports and example for recursive calls counts :</p>
<pre class="brush: sql; collapse: true; light: false; title: ; toolbar: true; notranslate">
[oracle@DB1 ~]$ cat tst.sql 
define row_cnt = &amp;1
define opt_lvl = &amp;2

exec dbms_workload_repository.create_snapshot;

alter session set plsql_optimize_level = &amp;opt_lvl;

begin
  for rec in (with a as (select null from dual connect by level &lt;= 1e5) select null from a,a where rownum &lt;= &amp;row_cnt) loop
    null;
  end loop; 
end;
/

exec dbms_workload_repository.create_snapshot;

define num_days = 1;
define  report_type  = 'text';
define  report_name  = '';

column inst_num   new_value inst_num  format 99999;
column inst_name  new_value inst_name format a12;
column db_name    new_value db_name   format a12;
column dbid       new_value dbid      format 9999999999;

select d.dbid            dbid
     , d.name            db_name
     , i.instance_number inst_num
     , i.instance_name   inst_name
  from v$database d,
       v$instance i;

column begin_snap new_value begin_snap  format 99999;
column end_snap   new_value end_snap    format 99999;

select max(snap_id) end_snap, max(snap_id)-1 begin_snap from dba_hist_snapshot;

@@?/rdbms/admin/awrrpti

exit
</pre>
<pre class="brush: sql; title: ; notranslate">
[oracle@DB1 ~]$ sqlplus / as sysdba @tst 1000000 0 | grep recursive
recursive calls                           1,001,075      156,736.3      91,006.8
recursive cpu usage                             467           73.1          42.5
[oracle@DB1 ~]$ sqlplus / as sysdba @tst 1000000 2 | grep recursive
recursive calls                              11,053        9,264.9       1,004.8
recursive cpu usage                              92           77.1           8.4
[oracle@DB1 ~]$ sqlplus / as sysdba @tst 0 0 | grep recursive
recursive calls                               1,084        1,358.4          98.6
recursive cpu usage                              58           72.7           5.3
[oracle@DB1 ~]$
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lou</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/15/transactions/#comment-53592</link>
		<dc:creator><![CDATA[Lou]]></dc:creator>
		<pubDate>Sun, 17 Feb 2013 05:04:03 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10589#comment-53592</guid>
		<description><![CDATA[Jonathan,

I am glad you touched on this topic since I was looking at my AWR last week and wondering what is my peak load in my system....so my question to you is .....can I use these stats &quot; Transactions per sec.&quot;  to determined when the peak load is on my production system?]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>I am glad you touched on this topic since I was looking at my AWR last week and wondering what is my peak load in my system&#8230;.so my question to you is &#8230;..can I use these stats &#8221; Transactions per sec.&#8221;  to determined when the peak load is on my production system?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Valentin Nikotin</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/15/transactions/#comment-53586</link>
		<dc:creator><![CDATA[Valentin Nikotin]]></dc:creator>
		<pubDate>Sat, 16 Feb 2013 19:49:42 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10589#comment-53586</guid>
		<description><![CDATA[Jonathan, I meant that just one cursor loop may cause a lot of recursive calls as every successful fetch call is counted as recursive. This is clear to see in case of plsql_optimize_level &lt; 2 or select for update cursor loop where is no array optimization or for manual fetches of course.]]></description>
		<content:encoded><![CDATA[<p>Jonathan, I meant that just one cursor loop may cause a lot of recursive calls as every successful fetch call is counted as recursive. This is clear to see in case of plsql_optimize_level &lt; 2 or select for update cursor loop where is no array optimization or for manual fetches of course.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohamed</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/15/transactions/#comment-53580</link>
		<dc:creator><![CDATA[Mohamed]]></dc:creator>
		<pubDate>Sat, 16 Feb 2013 12:20:56 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10589#comment-53580</guid>
		<description><![CDATA[Jonathan
If you issue a superflous COMMIT (commit that changes nothing ) the user commits statistics is not incremented. If you issue a superflous ROLLBACK (rollback that rolls nothing back as those probably done by web application servers ) the user rollback statistics is incremented while the rollback changes - undo records applied statistics aren&#039;t incremented. If you issue a real rollback (rollback that rolls something back) both the user rollback statistics and the undo records applied are incremented. If you issue a rollback to savepoint (whatever it is superflous or real rollback savepoints) the user rollback statistics is not incremented while the statistics undo records applied is incremented for a real rollback to savepoint and it is not incremented for a superflous rollback to savepoint.

That is : for commits, we can trust the statistics user_commits but for rollbacks we had better to trust rollback changes – undo records applied]]></description>
		<content:encoded><![CDATA[<p>Jonathan<br />
If you issue a superflous COMMIT (commit that changes nothing ) the user commits statistics is not incremented. If you issue a superflous ROLLBACK (rollback that rolls nothing back as those probably done by web application servers ) the user rollback statistics is incremented while the rollback changes &#8211; undo records applied statistics aren&#8217;t incremented. If you issue a real rollback (rollback that rolls something back) both the user rollback statistics and the undo records applied are incremented. If you issue a rollback to savepoint (whatever it is superflous or real rollback savepoints) the user rollback statistics is not incremented while the statistics undo records applied is incremented for a real rollback to savepoint and it is not incremented for a superflous rollback to savepoint.</p>
<p>That is : for commits, we can trust the statistics user_commits but for rollbacks we had better to trust rollback changes – undo records applied</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/15/transactions/#comment-53575</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sat, 16 Feb 2013 09:27:49 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10589#comment-53575</guid>
		<description><![CDATA[Todor,

I got there in the end (and even got the . changed to a ,).
I&#039;ve take the ceiling() of the lower and floor() of the higher value, though.]]></description>
		<content:encoded><![CDATA[<p>Todor,</p>
<p>I got there in the end (and even got the . changed to a ,).<br />
I&#8217;ve take the ceiling() of the lower and floor() of the higher value, though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/15/transactions/#comment-53574</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sat, 16 Feb 2013 09:21:28 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10589#comment-53574</guid>
		<description><![CDATA[Jared,

I can&#039;t quote names and versions off the top of my head, but various middle-tier tools handling connection pooling will (or used to) &quot;isolate&quot; the work done by each request by issuing a rollback extremely frequently.]]></description>
		<content:encoded><![CDATA[<p>Jared,</p>
<p>I can&#8217;t quote names and versions off the top of my head, but various middle-tier tools handling connection pooling will (or used to) &#8220;isolate&#8221; the work done by each request by issuing a rollback extremely frequently.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2013/02/15/transactions/#comment-53573</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sat, 16 Feb 2013 09:18:25 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=10589#comment-53573</guid>
		<description><![CDATA[Dom,

Great, isn&#039;t it. 
You can spend an awful lot of your time deliberately rolling back - but not quite far enough - and the &quot;obvious&quot; statistics tells you nothing about it. As Valentin points out, you have to cross-check with &quot;rollback changes - undo records applied&quot; to get an idea of how much work you are doing while rolling back. (And, of course, the rolling back from &quot;write consistency&quot; - as well as various other things - shows up in that statistic as well.)]]></description>
		<content:encoded><![CDATA[<p>Dom,</p>
<p>Great, isn&#8217;t it.<br />
You can spend an awful lot of your time deliberately rolling back &#8211; but not quite far enough &#8211; and the &#8220;obvious&#8221; statistics tells you nothing about it. As Valentin points out, you have to cross-check with &#8220;rollback changes &#8211; undo records applied&#8221; to get an idea of how much work you are doing while rolling back. (And, of course, the rolling back from &#8220;write consistency&#8221; &#8211; as well as various other things &#8211; shows up in that statistic as well.)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
