Re: Index Scans become Seq Scans after VACUUM ANALYSE - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Index Scans become Seq Scans after VACUUM ANALYSE
Date
Msg-id 200204251501.g3PF12513440@candle.pha.pa.us
Whole thread Raw
In response to Re: Index Scans become Seq Scans after VACUUM ANALYSE  (Michael Loftis <mloftis@wgops.com>)
Responses Re: Index Scans become Seq Scans after VACUUM ANALYSE  (Curt Sampson <cjs@cynic.net>)
List pgsql-hackers
Michael Loftis wrote:
> A Block-sized read will not be broken up.  But if you're reading ina 
>  size bigger than the underlying systems block sizes then it can get 
> broken up.
> 
> So yes a sequential read will get broken up.  A single read request for 
> a block may or may not get broken up.  If you're freading with set block 
> sizes you'll see the set sizes of blocks come through, but what the 
> underlying OS does is undefined, same for writing.  If the underlying 
> block size is 8KB and you dump 4MB down on it, the OS may (and in many 
> cases does) decide to write part of it, do a read ona  nearby sector, 
> then write the rest.  This happens when doing long writes that end up 
> spanning block groups because the inodes must be allocated.  

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.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Sequential Scan Read-Ahead
Next
From: Neil Conway
Date:
Subject: Re: Block size: 8K or 16K?