Wednesday, June 24, 2009

Stats of My Session

for 10g
select name,value 
from v$mystat,v$statname 
where v$mystat.statistic#=v$statname.statistic# 
and v$statname.statistic# in (11,12,50,51,52,53,54,62,134,179);

for 11gR1
select name,value 
from v$mystat,v$statname 
where v$mystat.statistic#=v$statname.statistic# 
and v$statname.statistic# in (11,12,53,54,55,56,57,58,59,60,61,62,64,65,66,68,72,146);

for 11gR2 (11.2.0.1)
select name,value 
from v$mystat,v$statname 
where v$mystat.statistic#=v$statname.statistic# 
and v$statname.statistic# in (13,14,63,64,65,66,67,68,69,70,71,72,75,76,77,79,83,169);

for 11gR2 (11.2.0.2)
select name,value 
from v$mystat,v$statname 
where v$mystat.statistic#=v$statname.statistic# 
and v$statname.statistic# in (15,16,66,67,68,69,70,71,72,73,74,75,78,79,80,82,86,175);

for 11gR2 (11.2.0.3)
select name,value 
from v$mystat,v$statname 
where v$mystat.statistic#=v$statname.statistic# 
and v$statname.statistic# in (16,17,68,69,70,71,72,73,74,75,76,78,81,82,83,85,89,178);

for all versions
select name,value 
from v$mystat,v$statname 
where v$mystat.statistic#=v$statname.statistic# 
and v$statname.name in ('CPU used when call started',
'CPU used by this session',
'db block gets',
'db block gets from cache',
'db block gets from cache (fastpath)',
'db block gets direct',
'consistent gets',
'consistent gets from cache',
'consistent gets from cache (fastpath)',
'consistent gets - examination',
'consistent gets direct',
'physical reads',
'physical reads direct',
'physical read IO requests',
'physical read bytes',
'consistent changes',
'physical writes',
'redo size');