Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Divisor is equal to zero

Re: Divisor is equal to zero

From: Wolfgang Breitling <breitliw_at_centrexcc.com>
Date: 2006-01-04 10:29:07
Message-id: 6.2.3.4.2.20060104020913.04697008@pop.centrexcc.com


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
Received on Wed Jan 04 2006 - 10:29:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US