Disk Readahead Stats

At 4:35 PM +0000 6/13/99, wjair@my-deja.com wrote:

> I also tried to find out where can I set the disk readahead or group 
> reads when performing table scan, e.g. [QEP snipped]
> "ctry_code" is not indexed, table scan on "cust" have visted
> 26 pages (418 records).  The cost to visit 26 pages is 13
> disk I/O (D13).  The readahead is only 2 pages for each DIO.
> How/where can I configure to reduce disk I/O?

You can't really compare the Dnn Cnn figures directly to real disk I/O's.
The problem is that the optimizer throws in all sorts of fudge factors as
it operates, in an attempt to allow for additional real life overheads that
occur without having to carry additional cost factors.
I found out (the hard way) that trying to relate anything Ingres reports
with actual OS-level traced disk I/O is an exercise in futility.  (Lots
of Ingres metrics come close to reality, but they all differ from one another
by small amounts and they all seem to disagree with the OS.)

If you find Ingres doing lots of table scans, and you can't for some reason
change either the queries or the table structures, you can try increasing
the group buffer size.  In 6.4 this was called count_read_ahead, it
defaults to 8 but you can try 16 or even 32.

Karl R. Schendel, Jr.
K/B Computer Associates   schendel@kbcomputer.com
Ingres and Unix Expertise

President, North American Ingres Users Association
president@naiua.org
Ingres Q & A
Back to William's Home Page

© William Yuan 2000

Email William