Oracle7 Server Tuning | ![]() Library |
![]() Product |
![]() Contents |
![]() Index |
SELECT SID
, EVENT
FROM V$SESSION_EVENT
WHERE WAIT_TIME = 0;
col NAME format a35
col VALUE format 999,999,990
select NAME, VALUE from V$SYSSTAT S
where lower(NAME) like lower(`%&stat_name%')
/
Note: Two lower functions in the preceding query make it case insensitive and allow it to report data from the 11 statistics whose names start with "CPU" or "DBWR". No other upper case characters appear in statistic names.
You can use the following query, for example, to report all statistics containing the word "get" in their name:
SQL> @STAT GET
It is preferable, however, to use some mechanism which records the change in the statistic(s) over a known period of time.
set veri off
define secs=0
define value=0
col value format 99,999,999,990 new_value value
col secs format a10 new_value secs noprint
col delta format 9,999,990
col delta_time format 9,990
col rate format 999,990.0
col name format a30
select name,value, to_char(sysdate,'sssss') secs,
(value - &value) delta,
(to_char(sysdate,'sssss') - &secs) delta_time,
(value - &value)/ (to_char(sysdate,'sssss') - &secs) rate
from v$sysstat
where name = '&&stat_name'
/
Note: This script must be run at least twice, because the first time it is run, it will initialize the SQL*Plus variables.
![]() ![]() Prev Next |
![]() Copyright © 1996 Oracle Corporation. All Rights Reserved. |
![]() Library |
![]() Product |
![]() Contents |
![]() Index |