Re: group by will not use an index?

Поиск
Список
Период
Сортировка
От Andrew Lazarus
Тема Re: group by will not use an index?
Дата
Msg-id 1961410679.20070109174127@pillette.com
обсуждение исходный текст
Ответ на Re: group by will not use an index?  (Scott Marlowe <smarlowe@g2switchworks.com>)
Ответы Re: group by will not use an index?  (tsuraan <tsuraan@gmail.com>)
Список pgsql-performance
For the reasons indicated (that is, MVCC), PG can not do a DISTINCT or the equivalent
GROUP BY from index values alone.

If this table is large, perhaps you could denormalize and maintain a
summary table with date (using truncation) and count, updated with
triggers on the original table. This table will presumably have a
small number of rows at the cost of doubling the times for updates,
inserts, and deletes.



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

Предыдущее
От: "Steinar H. Gunderson"
Дата:
Сообщение: Re: group by will not use an index?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Horribly slow query/ sequential scan