Tom Lane wrote:
> Jeff Janes <jeff.ja...@gmail.com> writes:
> > Of course if you do a full table scan because their are no better
> > options, then it scans sequentially.  But you have to scan the pages
> > in *some* order, and it is hard to see how something other than
> > sequential would be systematically better.
> 
> In fact, if sequential *isn't* the best order for reading the whole
> file, the filesystem has lost its marbles completely; because that is
> the order in which most files are read, so files ought to be laid out
> on disk (or whatever storage device) to be read most quickly that way.

Plus kernel read-ahead helps with sequential access too because the
kernel can guess the next blocks to be requested --- hard to do that
with random I/O.  SSD have fast access but still benefit from
read-ahead.

-- 
  Bruce Momjian  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to