Re: number of transactions in a day

  • From: "Alexander Fatkulin" <afatkulin@xxxxxxxxx>
  • To: "Jared Still" <jkstill@xxxxxxxxx>
  • Date: Fri, 1 Jun 2007 16:36:57 -0400

Why divide by gets??? You'll get "some gets" per transaction...

go for dbms_random then :)

P.S. you can do everything in one shot:

select  sum(case when name like '%gets%' then value else 0 end)/
                sum(case when name like 'user_commit%' then value else 0 end) 
"something"
        from v$sysstat
        where name like '%gets%' or name like 'user_commit%';

On 6/1/07, Jared Still <jkstill@xxxxxxxxx> wrote:
On 6/1/07, Alexander Fatkulin <afatkulin@xxxxxxxxx> wrote:

I like this one:

with commits as (
   select value commits
   from v$sysstat
   where name = 'user commits'
),
gets as (
   select sum(value) gets
   from v$sysstat
   where name like '%gets%'
)
select g.gets / c.commits transactions
from gets g, commits c
/

Or pick any alternative that makes the mgrs happy.

The database cannot tell them what they want to know.


--
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist



--
Alexander Fatkulin
--
//www.freelists.org/webpage/oracle-l


Other related posts: