Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: performance problem when migrate 7.3.4 to 8.0.5
Try this script. It might point you in the right direction. Warning... I
have not tested this script for Oracle 8, so you might have to tweak it for
new views or tables. Also, several init.ora parameters have changed, so you
might have to interpret the correct keyword.
spool snapshot.txt
prompt****************************************************prompt Hit Ratio Section
prompt****************************************************prompt
prompt =========================
prompt =========================
--select trunc((1-(sum(decode(name,'physical reads',value,0))/
column "logical_reads" format 99,999,999,999 column "phys_reads" format 999,999,999 column "phy_writes" format 999,999,999 select a.value + b.value "logical_reads", c.value "phys_reads", d.value "phy_writes", round(100 * ((a.value+b.value)-c.value) / (a.value+b.value)) "BUFFER HIT RATIO"
a.statistic# = 37
and
b.statistic# = 38
and
c.statistic# = 39
and
d.statistic# = 40;
prompt
prompt
prompt =========================
prompt =========================
prompt
column "Data Dict. Gets" format 999,999,999 column "Data Dict. cache misses" format 999,999,999 select sum(gets) "Data Dict. Gets",
sum(getmisses) "Data Dict. cache misses", trunc((1-(sum(getmisses)/sum(gets)))*100) "DATA DICT CACHEHIT RATIO"
prompt =========================
prompt =========================
column "LIBRARY CACHE MISS RATIO" format 99.9999 column "executions" format 999,999,999 column "Cache misses while executing" format 999,999,999 select sum(pins) "executions", sum(reloads) "Cache misses while executing", (((sum(reloads)/sum(pins)))) "LIBRARY CACHE MISS RATIO"from v$librarycache;
prompt
prompt =========================
prompt =========================
column "reloads" format 999,999,999
select namespace, trunc(gethitratio * 100) "Hit ratio",
trunc(pinhitratio * 100) "pin hit ratio", reloads "reloads"
from v$librarycache;
prompt
prompt
prompt =========================
prompt =========================
value
set heading on
prompt
prompt
prompt
column bytes format 999,999,999
select name, bytes from v$sgastat where name = 'free memory';
prompt
prompt****************************************************prompt SQL Summary Section
prompt****************************************************prompt
sum(users_executing) "SQL executing now" from v$sqlarea;
prompt
prompt
prompt****************************************************prompt Lock Section
prompt****************************************************prompt
prompt =========================
prompt =========================
substr(lock_type,1,18) "Lock Type", substr(mode_held,1,18) "Mode Held" from sys.dba_lock a, v$session b where lock_type not in ('Media Recovery','Redo Thread') and a.session_id = b.sid;
prompt =========================
prompt =========================
select substr(username,1,12) "User", substr(owner,1,8) "Owner", substr(name,1,15) "Name", substr(a.type,1,20) "Type", substr(mode_held,1,11) "Mode held" from sys.dba_ddl_locks a, v$session b where a.session_id = b.sid;
prompt
prompt =========================
prompt =========================
select substr(username,1,12) "User", substr(owner,1,8) "Owner", substr(name,1,20) "Name", substr(mode_held,1,21) "Mode held" from sys.dba_dml_locks a, v$session b where a.session_id = b.sid;
prompt
prompt
prompt****************************************************prompt Latch Section
prompt****************************************************prompt if miss_ratio or immediate_miss_ratio > 1 then latch prompt contention exists, decrease LOG_SMALL_ENTRY_MAX_SIZE in init.ora prompt
(misses/(gets+.001))*100 "miss_ratio", (immediate_misses/(immediate_gets+.001))*100 "immediate_miss_ratio" from v$latch l, v$latchname ln where l.latch# = ln.latch# and (misses/(gets+.001))*100 > .2 or (immediate_misses/(immediate_gets+.001))*100 > .2)
prompt
prompt
prompt****************************************************prompt Rollback Segment Section
prompt****************************************************prompt if any count below is > 1% of the total number of requests for data prompt then more rollback segments are needed --column count format 999,999,999
from v$waitstat
where class in ('free list','system undo header','system undo block',
'undo header','undo block')group by class,count;
column "Tot # of Requests for Data" format 999,999,999,999 select sum(value) "Tot # of Requests for Data" from v$sysstat where name in ('db block gets', 'consistent gets'); prompt
prompt =========================
prompt =========================
column "Ratio" format 99.99999
select name, waits, gets, waits/gets "Ratio"
from v$rollstat a, v$rollname b where a.usn = b.usn;
column "total_waits" format 999,999,999
column "total_timeouts" format 999,999,999
prompt
prompt
set feedback on;
prompt****************************************************prompt Session Event Section
prompt****************************************************prompt if average-wait > 0 then contention exists prompt
select substr(event,1,30) event, total_waits, total_timeouts, average_waitfrom v$session_event
prompt
prompt
prompt****************************************************prompt Queue Section
prompt****************************************************prompt average wait for queues should be near zero ... prompt
set feedback on;
prompt
prompt
--prompt****************************************************
--prompt Multi-threaded Server Section
--prompt****************************************************
--prompt
--prompt If the following number is > 1
--prompt then increase MTS_MAX_SERVERS parm in init.ora
--prompt
--prompt
--prompt If the following number increases, consider adding dispatcher
processes
--prompt
--set feedback off;
--prompt
--prompt
--prompt =========================
--prompt DISPATCHER USAGE
--prompt =========================
--prompt (If Time Busy > 50, then change MTS_MAX_DISPATCHERS in init.ora)
--column "Time Busy" format 999,999.999
--column busy format 999,999,999
--column idle format 999,999,999
--select name, status, idle, busy,
--prompt
--prompt
--select count(*) "Shared Server Processes"
--prompt
--prompt
--prompt high-water mark for the multi-threaded server
--prompt
--select * from v$mts;
--prompt
--prompt****************************************************
--prompt file i/o should be evenly distributed across drives.
--prompt
--select
--substr(a.file#,1,2) "#",
--substr(a.name,1,30) "Name",
--a.status,
--a.bytes,
--b.phyrds,
--b.phywrts
--from v$datafile a, v$filestat b
--where a.file# = b.file#;
--select substr(name,1,55) system_statistic, value
spool off;
--
> We just migrated our Oracle server from 7.3.4 to 8.0.5 for one of our > application with fat client built by PowerBuilder and we encounted an > EXTREMELY slow performance problem. What could it be? > >Received on Thu May 20 1999 - 17:07:46 CDT
![]() |
![]() |