Re: Too slow querying a table of 15 million records

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: Too slow querying a table of 15 million records
Дата
Msg-id 42C10F62.8030703@familyhealth.com.au
обсуждение исходный текст
Ответ на Too slow querying a table of 15 million records  (kjelle@bingon.no)
Список pgsql-performance
> database=> explain select date_trunc('hour', time),count(*) as total from
> test where p1=53 and time > now() - interval '24 hours' group by
> date_trunc order by date_trunc ;

Try going:

time > '2005-06-28 15:34:00'

ie. put in the time 24 hours ago as a literal constant.

Chris


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

Предыдущее
От: Jacques Caron
Дата:
Сообщение: Re: Insert performance vs Table size
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: tricky query