Re: Too slow querying a table of 15 million records

Поиск
Список
Период
Сортировка
От PFC
Тема Re: Too slow querying a table of 15 million records
Дата
Msg-id op.ss3ba3loth1vuj@localhost
обсуждение исходный текст
Ответ на Too slow querying a table of 15 million records  (kjelle@bingon.no)
Ответы Re: Too slow querying a table of 15 million records  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 ;

    1. Use CURRENT_TIMESTAMP (which is considered a constant by the planner)
instead of now()
    2. Create a multicolumn index on (p1,time) or (time,p1) whichever works
better

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

Предыдущее
От: John A Meinel
Дата:
Сообщение: Re: read block size
Следующее
От: Michael Stone
Дата:
Сообщение: Re: read block size