Re: Query take a long time and use no index

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: Query take a long time and use no index
Дата
Msg-id 7599651d-7269-ec5b-b968-46795a76c375@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Query take a long time and use no index  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Ответы Re: Query take a long time and use no index  (basti <mailinglist@unix-solution.de>)
Список pgsql-general
On 7/17/23 13:20, Tomas Vondra wrote:
> ...
> 
> It's always going to be slow with the COUNT(DISTINCT), I'm afraid.
> 
> Not sure how much you can modify the query / database, and how accurate
> results you need. If you're OK with estimates, you can try postgres-hll
> extension [2] which estimates count(distinct). For exact reaults, I
> wrote count_distinct extension [2] that uses hashtable. Might be worth a
> try, I guess.
> 

Damn, I forgot to add the links:

[1] https://github.com/citusdata/postgresql-hll

[2] https://github.com/tvondra/count_distinct

regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Query take a long time and use no index
Следующее
От: Ron
Дата:
Сообщение: Re: Query take a long time and use no index