Re: Slow query - possible bug? - Mailing list pgsql-performance

From Gavin Hamill
Subject Re: Slow query - possible bug?
Date
Msg-id 443E4C9D.3090301@laterooms.com
Whole thread Raw
In response to Re: Slow query - possible bug?  ("chris smith" <dmagick@gmail.com>)
Responses Re: Slow query - possible bug?
Re: Slow query - possible bug?
List pgsql-performance
chris smith wrote:

>1.6secs isn't too bad on 4.3mill rows...
>
>How many entries are there for that date range?
>
>
1.7 secs /is/ good - it typically takes 5 or 6 seconds, which isn't so
good. My question is 'why does the planner choose such a bizarre range
request when both elements of the 'between' are identical? :)'

If I replace the
(allocation0_."Date" between '2006-06-09 00:00:00.000000' and
'2006-06-09 00:00:00.000000')

with

allocation0_."Date" ='2006-04-09 00:00:00.000000'

then the query comes back in a few milliseconds (as I'd expect :) - and
yup I've been using different dates for each test to avoid the query
being cached.

For ref, there are typically 35000 rows per date :)

Cheers,
Gavin.


pgsql-performance by date:

Previous
From: "chris smith"
Date:
Subject: Re: Slow query - possible bug?
Next
From: Richard Huxton
Date:
Subject: Re: Slow query - possible bug?