Re: Index Scans become Seq Scans after VACUUM ANALYSE

From: Curt Sampson <cjs(at)cynic(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Michael Loftis <mloftis(at)wgops(dot)com>, mlw <markw(at)mohawksoft(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Index Scans become Seq Scans after VACUUM ANALYSE
Date: 2002-04-26 02:37:08
Message-ID: Pine.NEB.4.43.0204261130570.449-100000@angelic.cynic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 25 Apr 2002, Bruce Momjian wrote:

> Also keep in mind most disks have 512 byte blocks, so even if the file
> system is 8k, the disk block sizes are different. A given 8k or 1k file
> system block may not even be all in the same cylinder.

Right. Though much of the time they will be in the same cylinder,
sometimes they will be in adjacent cylinders if the drive manufacturer
has made cylinder sizes that are not multiples of 8K. I don't think
this is terribly frequent, but there's no way to substantiate that
assumption without knowing the real geometries of the drive, which
generally are not given out. (What is reported to the OS has not
been the real geometry for years now, because drive manufacturers
long ago started putting more blocks on the outer cylinders than
the inner ones.)

However, even that they will be in adjacent cylinders doesn't always
hold: depending on how the disk subsystems are partitioned, you
might be crossing a boundary where two partitions are joined
together, necessitating a seek. But this case would be quite rare.

You can always find conditions, in modern drive subsystems, where
the "read close together" idea doesn't hold, but in the vast, vast
majority of circumstances it does.

cjs
--
Curt Sampson <cjs(at)cynic(dot)net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Curt Sampson 2002-04-26 02:51:43 Re: Index Scans become Seq Scans after VACUUM ANALYSE
Previous Message Tom Lane 2002-04-26 02:32:14 Re: What is wrong with hashed index usage?