X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id D4D699DCA08 for ; Tue, 14 Feb 2006 16:54:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 63420-01 for ; Tue, 14 Feb 2006 16:54:11 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ns.snowman.net (ns.snowman.net [66.92.160.21]) by postgresql.org (Postfix) with ESMTP id 912299DC9DC for ; Tue, 14 Feb 2006 16:54:08 -0400 (AST) Received: by ns.snowman.net (Postfix, from userid 1000) id 532A617B80; Tue, 14 Feb 2006 15:55:10 -0500 (EST) Date: Tue, 14 Feb 2006 15:55:10 -0500 From: Stephen Frost To: Tom Lane Cc: Jay Greenfield , pgsql-performance@postgresql.org Subject: Re: Postgres slower than MS ACCESS Message-ID: <20060214205510.GJ4474@ns.snowman.net> Mail-Followup-To: Tom Lane , Jay Greenfield , pgsql-performance@postgresql.org References: <200602141551.k1EFpN6F020512@timberline.ca> <20060214172022.GC4474@ns.snowman.net> <22347.1139949764@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0mMlreQBxyBIiF/S" Content-Disposition: inline In-Reply-To: <22347.1139949764@sss.pgh.pa.us> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/2.4.24ns.3.0 (i686) X-Uptime: 15:53:07 up 248 days, 13:02, 13 users, load average: 0.41, 0.60, 0.62 User-Agent: Mutt/1.5.11 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.111 required=5 tests=[AWL=0.111] X-Spam-Score: 0.111 X-Spam-Level: X-Archive-Number: 200602/174 X-Sequence-Number: 17160 --0mMlreQBxyBIiF/S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > While it's true that Access almost certainly takes some shortcuts, 24 > > minutes for an update across 1.2 millon rows seems an awefully long time > > for Postgres. >=20 > I did some experiments along this line with a trivial table (2 integer > columns) of 1.28M rows. I used CVS tip with all parameters at defaults. > With no indexes, an UPDATE took about 50 seconds. With one index, it > took 628 seconds. It's not hard to believe you could get to Jay's > figures with multiple indexes. With multiple indexes, you might want to drop them and recreate them when you're updating an entire table. > Looking in the postmaster log, I see I was getting checkpoints every few > seconds. Increasing checkpoint_segments to 30 (a factor of 10) brought > it down to 355 seconds, and then increasing shared_buffers to 20000 > brought it down to 165 sec. Separating WAL and data onto different > disks would have helped too, no doubt, but I'm too lazy to try it. Sure, this was kind of my point, we need more information about the database if we're going to have much of a chance of improving the results he's seeing. 165 seconds is certainly a great deal better than 24 minutes. :) Thanks, Stephen --0mMlreQBxyBIiF/S Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFD8kOurzgMPqB3kigRAuwyAJsETf99Trk9jD6S08LKlJIjDkkpkgCfaVWJ c+1NSnXyravhObn5jZ0QgRA= =Im0L -----END PGP SIGNATURE----- --0mMlreQBxyBIiF/S--