cle col
prompt ###############################
prompt #### GETS FOR ALL SESSIONS ####
prompt ###############################
set echo off
set feedback off
set lines 300
col name format A40
ttitle off
break on report on sid on username on status on osuser
compute sum of get on report
select  s.sid,ss.serial#,
	substr(ss.USERNAME,1,15)||' '||substr(machine,1,12) USERNAME,
	ss.STATUS,
	substr(ss.OSUSER,1,13) OSUSER,
	sum(s.value) GET
from v$sesstat s,v$statname n, v$session ss
where n.statistic# = s.statistic#
 and n.name in ('db block gets', 'consistent gets')
-- and n.name in ('consistent changes')
and s.sid=ss.sid and ss.type='USER' and ss.username is not null
group by s.sid,ss.serial#,ss.username,ss.status,ss.machine,ss.osuser,logon_time
order by sum(s.value)
/
cle break
