X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 26A9752A47 for ; Tue, 28 Jun 2005 14:03:04 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 89741-03 for ; Tue, 28 Jun 2005 17:03:01 +0000 (GMT) Received: from sccmmhc92.asp.att.net (sccmmhc92.asp.att.net [204.127.203.212]) by svr1.postgresql.org (Postfix) with ESMTP id 892F552A01 for ; Tue, 28 Jun 2005 14:02:59 -0300 (ADT) Received: from juju.arbash-meinel.com ([12.214.18.81]) by sccmmhc92.asp.att.net (sccmmhc92) with ESMTP id <20050628170300m92008iri0e>; Tue, 28 Jun 2005 17:03:00 +0000 Received: by juju.arbash-meinel.com (Postfix, from userid 505) id 8EBA85606A; Tue, 28 Jun 2005 12:02:59 -0500 (CDT) Received: from [192.168.1.11] (mail [192.168.1.1]) by juju.arbash-meinel.com (Postfix) with ESMTP id 248F655FB6; Tue, 28 Jun 2005 12:02:56 -0500 (CDT) Message-ID: <42C182BF.1050808@arbash-meinel.com> Date: Tue, 28 Jun 2005 12:02:55 -0500 From: John A Meinel User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Stone Cc: pgsql-performance@postgresql.org Subject: Re: read block size References: <20050628152750.GV9591@mathom.us> In-Reply-To: <20050628152750.GV9591@mathom.us> X-Enigmail-Version: 0.92.0.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigA803AE2837C26A452F344851" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.051 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/564 X-Sequence-Number: 13201 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA803AE2837C26A452F344851 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 =:-> --------------enigA803AE2837C26A452F344851 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Cygwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCwYK/JdeBCYSNAAMRAuhMAJ402Fc1BBV7omnC8DFPZGGfMZeZeACgrOBx 8smJXXUGV69jR88p9+cAAmg= =wwvt -----END PGP SIGNATURE----- --------------enigA803AE2837C26A452F344851--