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

Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL IO Disk Reads

Re: SQL IO Disk Reads

From: Bob Fazio <rfazio_at_home.com.nospam>
Date: 2000/05/26
Message-ID: <VKuX4.209849$Tn4.1867060@news1.rdc2.pa.home.com>#1/1

You can use the autotrace tool for sqlplus to see how many reads you are making.

SQL> set autotrace on;
SQL> desc bob;

 Name                            Null?    Type
 ------------------------------- -------- ----
 A                                        NUMBER

SQL> select * from bob;

        A


        1
        1
        1
        1


Execution Plan


   0 SELECT STATEMENT Optimizer=CHOOSE    1 0 TABLE ACCESS (FULL) OF 'BOB' Statistics


          0  recursive calls
          3  db block gets
          2  consistent gets
          0  physical reads
          0  redo size
        416  bytes sent via SQL*Net to client
        456  bytes received via SQL*Net from client
          4  SQL*Net roundtrips to/from client
          1  sorts (memory)
          0  sorts (disk)
          4  rows processed

SQL> The number of physical reads represent the number of reads actually done to disk (0). The number of db block gets is the number of reads done to the table (3). The number of consistent gets, are the number of reads done to redo logs;

consistent gets
The number of times a consistent read was requested for a block. See also consistent changes above.

db block gets
This statistic tracks the number of blocks obtained in CURRENT mode.

physical reads
This statistic stores the number of physical blocks when the operating system retrieves a database block from the disk subsystem. This is a buffer cache miss.

Logical reads is consistent gets + database block gets. Logical reads and physical reads are used to calculate the buffer cache hit ratio.

--
Robert Fazio, Oracle DBA
rfazio_at_home.com
remove nospam from reply address
http://24.8.218.197/
"Paul" <paul_at_yeahright.com> wrote in message
news:4KcX4.120$5Y.3542_at_news11-gui.server.ntli.net...

> Does SQL extract records per page or or per item in a page. e.g.
> If I had 2 record per page, in general, would the number of IO's be one IO
> for every two records or two IO's for two records?
> Cheers
>
>
>
>
Received on Fri May 26 2000 - 00:00:00 CDT

Original text of this message

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