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 C5F5011F8CA7 for ; Tue, 18 Apr 2006 16:52:03 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.128 X-Spam-Level: X-Spam-Status: No, score=0.128 required=5 tests=[AWL=0.128] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id Ywz1Uj+LdHoL for ; Tue, 18 Apr 2006 16:51:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 9EBD111F8CA2 for ; Tue, 18 Apr 2006 16:51:48 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k3IJpj2n018449; Tue, 18 Apr 2006 15:51:45 -0400 (EDT) To: Gavin Hamill cc: pgsql-performance@postgresql.org Subject: Re: Slow query - possible bug? In-reply-to: <20060418200839.1f948672.gdh@laterooms.com> References: <443E3DF5.4020207@laterooms.com> <3c1395330604130546g6b091f75x511955817fe65dcd@mail.gmail.com> <443E4C9D.3090301@laterooms.com> <20329.1144942010@sss.pgh.pa.us> <44449E4C.7040804@laterooms.com> <14985.1145381508@sss.pgh.pa.us> <20060418200839.1f948672.gdh@laterooms.com> Comments: In-reply-to Gavin Hamill message dated "Tue, 18 Apr 2006 20:08:39 +0100" Date: Tue, 18 Apr 2006 15:51:44 -0400 Message-ID: <18448.1145389904@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200604/392 X-Sequence-Number: 18476 Gavin Hamill writes: > On Tue, 18 Apr 2006 13:31:48 -0400 > Tom Lane wrote: >> There should be a fix for this by the time PG 8.2 comes out, but in >> the meantime you might find that it helps to write the range check in >> a way that doesn't have identical bounds, eg >> date >= '2006-06-10'::date AND date < '2006-06-11'::date > OK coolies - we've already had a code release for this (and other > stuff) planned for tomorrow morning checking on the client side > if a single date has been chosen, then do an equality test on that... Fair enough, no reason to replace one workaround with another. But would you try it on your test case, just to verify the diagnosis? regards, tom lane