Re: Slow count(*) again...

Mladen Gogala <mladen.gogala@vmsinfo.com>

From: Mladen Gogala <mladen.gogala@vmsinfo.com>
To: Joshua Tolley <eggyknap@gmail.com>
Cc: Craig Ringer <craig@postnewspapers.com.au>, Neil Whelchel <neil.whelchel@gmail.com>, "pgsql-performance@postgresql.org" <pgsql-performance@postgresql.org>
Date: 2010-10-11T03:14:43Z
Lists: pgsql-hackers, pgsql-performance
  On 10/10/2010 8:27 PM, Joshua Tolley wrote:
> It was asserted that reading bigger chunks would help performance; a response
> suggested that, at least in Linux, setting readahead on a device would
> essentially do the same thing. Or that's what I got from the thread, anyway.
> I'm interested to know how similar performance might be between the large
> block size case and the large readahead case. Comments, anyone?
>

Craig maybe right, the fact that Oracle is doing direct I/O probably 
does account for the difference. The fact is, however, that the question 
about slow sequential scan appears with some regularity on PostgreSQL 
forums. My guess that a larger chunk would be helpful may not be 
correct, but I do believe that there is a problem with a too slow 
sequential scan.  Bigger chunks are a very traditional solution which 
may not work but the problem is still there.

-- 
Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
www.vmsinfo.com