Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1C5D3477494 for ; Wed, 15 Jan 2003 15:51:17 -0500 (EST) Received: from jester.senspire.com (unknown [216.208.117.7]) by postgresql.org (Postfix) with ESMTP id D075D476C5B for ; Wed, 15 Jan 2003 14:53:01 -0500 (EST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by jester.senspire.com (8.12.6/8.12.6) with ESMTP id h0FJrC57055306; Wed, 15 Jan 2003 14:53:12 -0500 (EST) (envelope-from rbt@rbt.ca) Subject: Re: 7.3.1 New install, large queries are slow From: Rod Taylor To: Roman Fail Cc: Pgsql Performance In-Reply-To: <9B1C77393DED0D4B9DAA1AA1742942DA0E4BF9@pos_pdc.posportal.com> References: <9B1C77393DED0D4B9DAA1AA1742942DA0E4BF9@pos_pdc.posportal.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-TKYLVvCycETYl5CgONyR" Organization: Message-Id: <1042660391.61110.36.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.0 Date: 15 Jan 2003 14:53:11 -0500 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/122 X-Sequence-Number: 769 --=-TKYLVvCycETYl5CgONyR Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I didn't see the query itself in the message, but it looks to me like it's poorly formed. Could you send it?=20 By quick glance, either you're using a bunch of explicit joins that are poorly formed (you've made a bad choice in order) or those particular IDs are really popular. There are a number of sequential scans that possibly should be index scans. > EXPLAIN ANALYZE RESULTS: > Limit (cost=3D370518.31..370518.31 rows=3D1 width=3D540) (actual time=3D= 1168722.18..1168722.20 rows=3D5 loops=3D1) > -> Sort (cost=3D370518.31..370518.31 rows=3D1 width=3D540) (actual ti= me=3D1168722.18..1168722.18 rows=3D5 loops=3D1) > Sort Key: b.batchdate --=20 Rod Taylor PGP Key: http://www.rbt.ca/rbtpub.asc --=-TKYLVvCycETYl5CgONyR Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQA+Jbwm6DETLow6vwwRAvdWAJ9babghSXR90MBRe5c/J0iYvmEi5QCcD7WL 37Udyk8vi5YZ+LBBPM0vif4= =ZuPQ -----END PGP SIGNATURE----- --=-TKYLVvCycETYl5CgONyR--