Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Questionable V$SQLAREA Statistics

Re: Questionable V$SQLAREA Statistics

From: Stephane Faroult <>
Date: Mon, 01 Jul 2002 13:43:43 -0800
Message-ID: <>

"Orr, Steve" wrote:
> Here's the scene:
> 1) I have a 400,000 row table table which is cached.
> 2) I have a query against that table and no other with one column referenced
> in the WHERE clause. (This column is indexed and of course I don't really
> need the index since the table is cached but it's there so ho hum...)
> 3) When I run tkprof on the query it shows a full table scan ignoring the
> index... that's what I want 'cause it's cached.
> 4) But when I look at V$SQLAREA the DISK_READS column is incremented.
> 5) This query is executed very often so my StatsPack report lists it as one
> of the most expensive queries in terms of physical reads.
> It appears that Oracle is counting full table scans of cached tables as
> DISK_READS in V$SQLAREA. Seems like this is a bug to me 'cause it's not
> really a physical disk read but is getting data from the buffers.
> Don't you think this is a bug? Has anyone seen this before?
> Steve Orr
> Looking for cache in Bozeman, Montana


  First, as far as I understand it, to 'cache' a table is just to specify that after a table scan the table blocks in memory will not be prime candidate for recycling. It doesn't imply to me that the table is pinned up there in physical memory. Do you know how many blocks your table is made of? What percentage of db_block_buffers does it represent? I see nothing shocking in having I/Os. Moreover do not forget consistent reads (i.e. rollback segments). How can you be sure that your rollback segment blocks stay in memory? Not to mention temporary segments and the like.
  Second, it's not because a table is in memory that you should scorn indexes. The index tells you, basically,that this row is at this position in this block. Unless your table as been defined as a single, char(1) (most of them null) table, 400,000 rows probably represent a fair number of blocks and converting block number to memory address is certainly far more efficient than scanning all the blocks in memory.


Stephane Faroult
Oriole Software
Please see the official ORACLE-L FAQ:
Author: Stephane Faroult

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
To REMOVE yourself from this mailing list, send an E-Mail message
to: (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Jul 01 2002 - 16:43:43 CDT

Original text of this message