Re: Slow query - possible bug?

Поиск
Список
Период
Сортировка
От Gavin Hamill
Тема Re: Slow query - possible bug?
Дата
Msg-id 443E4C9D.3090301@laterooms.com
обсуждение исходный текст
Ответ на Re: Slow query - possible bug?  ("chris smith" <dmagick@gmail.com>)
Ответы Re: Slow query - possible bug?  (Richard Huxton <dev@archonet.com>)
Re: Slow query - possible bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: "chris smith"
Дата:
Сообщение: Re: Slow query - possible bug?
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Slow query - possible bug?