X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 0C489D1C94C for ; Thu, 31 Jul 2003 23:00:07 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 89044-01 for ; Thu, 31 Jul 2003 19:58:57 -0300 (ADT) Received: from flake.decibel.org (unknown [66.143.173.58]) by svr1.postgresql.org (Postfix) with SMTP id EEC3FD1C92B for ; Thu, 31 Jul 2003 20:00:00 -0300 (ADT) Received: (qmail 98915 invoked by uid 1001); 31 Jul 2003 22:59:59 -0000 Date: Thu, 31 Jul 2003 17:59:59 -0500 From: "Jim C. Nasby" To: pgsql-performance@postgresql.org Subject: Re: Odd explain estimate Message-ID: <20030731225959.GH55392@nasby.net> References: <20030731195145.GD55392@nasby.net> <20030731205921.GF16230@libertyrms.info> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030731205921.GF16230@libertyrms.info> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.8-RELEASE i386 X-Distributed: Join the Effort! http://www.distributed.net X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/523 X-Sequence-Number: 2816 On Thu, Jul 31, 2003 at 04:59:21PM -0400, Andrew Sullivan wrote: > On Thu, Jul 31, 2003 at 02:51:45PM -0500, Jim C. Nasby wrote: > If you really needed to set enable_seqscan=false (did you really? > Are you sure that's not the cheapest way?), you might want to > investigate expainding the statistics on the indexed column, > increasing the correlation through clustering, and other such tricks. Well, if I don't do this it wants to seqscan a table that occupies 350k pages, instead of pulling a couple thousand rows. I started running it with the seqscan and it's already taken way longer than it does if I disable seqscan. I guess I'll try expanding the statistics. -- Jim C. Nasby, Database Consultant jim@nasby.net Member: Triangle Fraternity, Sports Car Club of America Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"