X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 5F7099FA5BA for ; Thu, 15 Jun 2006 12:50:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 14396-01 for ; Thu, 15 Jun 2006 12:50:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 009F69F9CAA for ; Thu, 15 Jun 2006 12:50:07 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id E5E0456457; Thu, 15 Jun 2006 10:50:01 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Thu, 15 Jun 2006 10:50:00 -0500 Date: Thu, 15 Jun 2006 10:50:00 -0500 From: "Jim C. Nasby" To: Tom Lane Cc: Shaun Thomas , pgsql-performance@postgresql.org Subject: Re: Confirmation of bad query plan generated by 7.4 Message-ID: <20060615155000.GJ34196@pervasive.com> References: <9119.1150222168@sss.pgh.pa.us> <448EDFC4.8F27.00A9.0@leapfrogonline.com> <20060613211347.GB34196@pervasive.com> <10918.1150236282@sss.pgh.pa.us> <20060613223950.GK34196@pervasive.com> <18667.1150249849@sss.pgh.pa.us> <16554.1150339015@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16554.1150339015@sss.pgh.pa.us> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060615:tgl@sss.pgh.pa.us::tL1/3iGfzHCTNyBX:00000000000000000000 0000000000000000000000003Rkq X-Hashcash: 1:20:060615:sthomas@leapfrogonline.com::3aceqIZlepcP6lsl:00000000000 0000000000000000000000001aXn X-Hashcash: 1:20:060615:pgsql-performance@postgresql.org::ac/GbZvL/Cfpi9F+:00000 000000000000000000000000DLKB X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/307 X-Sequence-Number: 19664 On Wed, Jun 14, 2006 at 10:36:55PM -0400, Tom Lane wrote: > Jim Nasby writes: > > On Jun 13, 2006, at 8:50 PM, Tom Lane wrote: > >> Hmm ... worksforme. Could you provide a complete test case? > > > decibel=# create table date_test(d date not null, i int not null); > > [etc] > > Not sure what you are driving at. The estimates are clearly not > defaults (the default estimate would be 1/3rd of the table, or > about 100mil rows). Are you expecting them to be the same? If so why? > The comparison values are slightly different after all. Yes... I was expecting that since we're looking at a date field that the timestamp would get cast to a date. Sorry I wasn't clear on that... -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461