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 C933C11F6238 for ; Tue, 18 Apr 2006 16:08:45 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.106 X-Spam-Level: X-Spam-Status: No, score=0.106 required=5 tests=[AWL=0.106] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 4L+aBbRIsIEs for ; Tue, 18 Apr 2006 16:08:39 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from fon.nation-net.com (fon.nation-net.com [194.24.251.1]) by postgresql.org (Postfix) with ESMTP id 00FA511F60B9 for ; Tue, 18 Apr 2006 16:08:39 -0300 (ADT) Received: from fon.nation-net.com (localhost [127.0.0.1]) by fon.nation-net.com (Postfix) with ESMTP id 525EA136CCB for ; Tue, 18 Apr 2006 20:08:38 +0100 (BST) Received: from eddie.acentral.co.uk (80-192-144-33.cable.ubr04.pres.blueyonder.co.uk [80.192.144.33]) by fon.nation-net.com (Postfix) with ESMTP id 2DF11136C5B for ; Tue, 18 Apr 2006 20:08:38 +0100 (BST) Received: from eddie.acentral.co.uk (eddie.acentral.co.uk [127.0.0.1]) by eddie.acentral.co.uk (Postfix) with ESMTP id 55C4C75A9A for ; Tue, 18 Apr 2006 20:08:40 +0100 (BST) Received: from localhost.localdomain (unknown [10.0.0.29]) by eddie.acentral.co.uk (Postfix) with SMTP id 4348975A89 for ; Tue, 18 Apr 2006 20:08:40 +0100 (BST) Date: Tue, 18 Apr 2006 20:08:39 +0100 From: Gavin Hamill To: pgsql-performance@postgresql.org Subject: Re: Slow query - possible bug? Message-Id: <20060418200839.1f948672.gdh@laterooms.com> In-Reply-To: <14985.1145381508@sss.pgh.pa.us> 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> X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.17; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-AV-Checked: ClamAV using ClamSMTP X-Archive-Number: 200604/391 X-Sequence-Number: 18475 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... otherwise leave the between in place - seems to work like a charm, and hopefully it'll mean we don't have a loadavg of 15 on our main pg server tomorrow (!) :)) Basically, as long as I know it's a pg issue rather than something daft I've done (or not done) then I'm happy enough. Cheers, Gavin.