From: John A Meinel <john@arbash-meinel.com>
To: Michael Stone <mstone+postgres@mathom.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: read block size
Date: Tue, 28 Jun 2005 12:02:55 -0500
Message-ID: <42C182BF.1050808@arbash-meinel.com> (raw)
In-Reply-To: <20050628152750.GV9591@mathom.us>
References: <20050628152750.GV9591@mathom.us>
Michael Stone wrote:
> Is it possible to tweak the size of a block that postgres tries to read
> when doing a sequential scan? It looks like it reads in fairly small
> blocks, and I'd expect a fairly significant boost in i/o performance
> when doing a large (multi-gig) sequential scan if larger blocks were
> used.
>
> Mike Stone
I believe postgres reads in one database page at a time, which defaults
to 8k IIRC. If you want bigger, you could recompile and set the default
page size to something else.
There has been discussion about changing the reading/writing code to be
able to handle multiple pages at once, (using something like vread())
but I don't know that it has been implemented.
Also, this would hurt cases where you can terminate as sequential scan
early. And if the OS is doing it's job right, it will already do some
read-ahead for you.
John
=:->
Attachments:
signature.asc (application/pgp-signature, 252B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: john@arbash-meinel.com, mstone+postgres@mathom.us
Subject: Re: read block size
In-Reply-To: <42C182BF.1050808@arbash-meinel.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox