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 D1CC48B9E5F for ; Sun, 6 Feb 2005 15:19:39 +0000 (GMT) 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 25649-07 for ; Sun, 6 Feb 2005 15:19:24 +0000 (GMT) Received: from ct.radiology.uiowa.edu (ct.radiology.uiowa.edu [129.255.60.186]) by svr1.postgresql.org (Postfix) with ESMTP id 542F18B9B31 for ; Sun, 6 Feb 2005 15:19:24 +0000 (GMT) Received: from [192.168.1.11] (12-217-241-0.client.mchsi.com [12.217.241.0]) by ct.radiology.uiowa.edu (8.11.6/8.11.6) with ESMTP id j16FJE310793; Sun, 6 Feb 2005 09:19:14 -0600 Message-ID: <4206356C.9060308@arbash-meinel.com> Date: Sun, 06 Feb 2005 09:19:08 -0600 From: John A Meinel User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: lutzeb@aeccom.com Cc: Greg Stark , pgsql-performance@postgresql.org, tgl@sss.pgh.pa.us Subject: Re: query produces 1 GB temp file References: <20050205182117.0125074@mail2.aeccom.com> <87y8e2kb8j.fsf@stark.xeocode.com> <42061B35.6000306@aeccom.com> In-Reply-To: <42061B35.6000306@aeccom.com> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig3F92F2BCD0AF6B1A96F413FE" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200502/87 X-Sequence-Number: 10416 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3F92F2BCD0AF6B1A96F413FE Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Dirk Lutzebaeck wrote: > Greg, > > Thanks for your analysis. But I dont get any better after bumping > STATISTICS target from 10 to 200. > explain analyze shows that the optimizer is still way off estimating > the rows. Is this normal? It still produces a 1 GB temp file. > I simplified the query a bit, now only two tables are involved (bi, > df). I also vacuumed. Are you just doing VACUUM? Or are you doing VACUUM ANALYZE? You might also try VACUUM ANALYZE FULL (in the case that you have too many dead tuples in the table). VACUUM cleans up, but doesn't adjust any planner statistics without ANALYZE. John =:-> --------------enig3F92F2BCD0AF6B1A96F413FE 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.2.6 (Cygwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCBjVwJdeBCYSNAAMRAnRoAKCRdqa1y+To3TusqiejEFGqDjLMJwCgkuF4 UsCJ5jrsQBBMWZOHqHEVD6M= =41zs -----END PGP SIGNATURE----- --------------enig3F92F2BCD0AF6B1A96F413FE--