--======================================================================= -- -- after_run.sql -- -- Copyright (C) Oriole Software, 2001 -- -- Downloaded from http://www.oriole.com -- -- This script for Oracle database administration is free software; you -- can redistribute it and/or modify it under the terms of the GNU General -- Public License as published by the Free Software Foundation; either -- version 2 of the License, or any later version. -- -- This script is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- --======================================================================= -- This script is to be used with before_run.sql. -- See explanations and usage example in before_run.sql. -- set timing off set pagesize 0 set feedback off set recsep off set verify off select 'LOGICAL READS: ' || to_char(sum(decode(n.name, 'session logical reads', s.value, 0)) - &old_lr - 8) || chr(10) || 'CPU used : ' || to_char(sum(decode(n.name, 'CPU used by this session', s.value, 0)) - &old_cpu) from v$statname n, v$sesstat s, v$session se where se.audsid = sys_context('USERENV', 'SESSIONID') and s.sid = se.sid and s.statistic# = n.statistic# and n.name in ('session logical reads', 'CPU used by this session') / set pagesize 24 set feedback on