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

Home -> Community -> Usenet -> c.d.o.server -> RE: script for buffer hit ratio ??

RE: script for buffer hit ratio ??

From: Steve Adams <steve.adams_at_ixora.com.au>
Date: Tue, 26 Oct 1999 07:29:31 +1000
Message-ID: <01BF1F84.777CB970.steve.adams@ixora.com.au>


Hi Ed,

Calculating the hit ratio correctly can be non-trivial. There is a tip on my web site about how to do it. Please have a look at http://www.ixora.com.au/. The tip is called "Calculating the Cache Hit and Miss Rates".

Regards,
Steve Adams

http://www.ixora.com.au/

http://www.oreilly.com/catalog/orinternals/

http://www.christianity.com.au/


-----Original Message-----
From:	Ed Stevens [SMTP:ed.stevens_at_nmm.nissan-usa.com]
Sent:	Saturday, October 23, 1999 1:50 AM
To:	comp.databases.oracle.server_at_list.deja.com
Subject:	script for buffer hit ratio ??

I'm seeking some help understanding a PL*SQL script for determining buffer hit ratios. I picked up the script from Oracle Magazine's "Tip and Code Archive." Specifically, it is "listing 6" located at http://www.oracle.com/oramag/code/cod46dba.html. As published there, the section of code dealing with buffer hit ratio has two blocks of code, one of which is commented out. When I run the code as published, the buffer hit ratio is reported as a negative number in the thousands. This made no sense to me, so I uncommented the other block of code and ran it, getting number that made sense. After closely analyzing the two methods, I find that the one that was originally commented out is essentially saying

buffer hit ratio = 1 - physical_reads / (db_block_gets + consistent_gets)

While the originally active code is saying

buffer hit ratio = ((opens_of_replaced_files + db_block_gets) - consistent_gets) / (opens_of_replaced_files + db_block_gets))

Does anyone have any comments on the use or meaning of either of these pieces of code?

TIA

Sent via Deja.com http://www.deja.com/
Before you buy.

 Sent via Deja.com http://www.deja.com/  Before you buy. Received on Mon Oct 25 1999 - 16:29:31 CDT

Original text of this message

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