Re: count(distinct)

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: count(distinct)
Дата
Msg-id 498C4AAA.9080304@archonet.com
обсуждение исходный текст
Ответ на count(distinct)  (Zdravko Balorda <zdravko.balorda@siix.com>)
Список pgsql-sql
Zdravko Balorda wrote:
> this is probably an old issue but I'm not all that experienced.
> 
> I wonder if an index can be accessed rather directly, as to speed up
> a query like "select count(distinct())", by simply calculating the
> number of branches (leaves) an index has. Or at least to skip sorting.

Afraid not. Have a search of the archives for discussion on "mvcc
visibility indexes" for lots on this.

--  Richard Huxton Archonet Ltd


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

Предыдущее
От: Zdravko Balorda
Дата:
Сообщение: count(distinct)
Следующее
От: Michael B Allen
Дата:
Сообщение: Re: Implementing "access lists" (was: Must I use DISTINCT?)