Re: Query across a date range

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Query across a date range
Дата
Msg-id 200501071135.11229.josh@agliodbs.com
обсуждение исходный текст
Ответ на Query across a date range  (David Jaquay <djaquay@gmail.com>)
Ответы Re: Query across a date range  (David Jaquay <djaquay@gmail.com>)
Список pgsql-performance
David,

> The problem: Doing a query for a date range on a particular store or
> market, though, for a date range of more than a few days does a
> sequential scan of sales_tickets, and performs worse than doing one
> single date query for each date.  My 'explain' for one such query is
> below.

Can you run EXPLAIN ANALYZE instead of just EXPLAIN?  That will show you the
discrepancy between estimated and actual costs, and probably show you what
needs fixing.

--
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

В списке pgsql-performance по дате отправления:

Предыдущее
От: David Jaquay
Дата:
Сообщение: Query across a date range
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Query across a date range