
|
[oracle-l]
||
[Date Prev]
[01-2006 Date Index]
[Date Next]
||
[Thread Prev]
[01-2006 Thread Index]
[Thread Next]
Re: Divisor is equal to zero
- From: Wolfgang Breitling <breitliw@xxxxxxxxxxxxx>
- To: onkarnath.tiwary@xxxxxxxxx
- Date: Wed, 04 Jan 2006 02:29:07 -0700
What Oracle version?
select b.statistic#, b.name, a.value
from v$sysstat a, v$statname b
where a.statistic# = b.statistic#
and b.statistic# between 38 and 40
Oracle 8.1:
STATISTIC# NAME VALUE
---------- ---------------------------------------- ----------
38 db block gets 297
39 consistent gets 45015
40 physical reads 39134
Oracle 9.2:
STATISTIC# NAME VALUE
---------- ------------------------------ ----------
38 gcs messages sent 0
39 ges messages sent 0
40 db block gets 4589
Oracle 10.1:
STATISTIC# NAME VALUE
---------- ---------------------------------------- ----------
38 gcs messages sent 0
39 ges messages sent 0
40 global enqueue CPU used by this session 0
Oracle 10.2:
STATISTIC# NAME VALUE
---------- ---------------------------------------- ----------
38 physical read total multi block requests 6032
39 physical read total bytes 8337019904
40 physical write total IO requests 2667731
The statistic#s change between versions. You can not just take your
8.1 scripts, run them against another version and expect them to work.
At 10:56 PM 1/3/2006, Onkar N Tiwary wrote:
To find the buffer hit ratio, when I executed the following query
its giving me one error "
(a.value+b.value))
*
ERROR at line 4:
ORA-01476: divisor is equal to zero
"
The query is :
"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",
round(100 * ((a.value+b.value)-c.value) /
(a.value+b.value))
"BUFFER HIT RATIO"
from v$sysstat a, v$sysstat b, v$sysstat c
where
a.statistic# = 38
and
b.statistic# = 39
and
c.statistic# = 40;"
Regards
Wolfgang Breitling
Centrex Consulting Corporation
http://www.centrexcc.com
--
http://www.freelists.org/webpage/oracle-l
|

|