Re: count(distinct)

From: Richard Huxton <dev(at)archonet(dot)com>
To: Zdravko Balorda <zdravko(dot)balorda(at)siix(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: count(distinct)
Date: 2009-02-06 14:35:22
Message-ID: 498C4AAA.9080304@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael B Allen 2009-02-07 01:32:35 Re: Implementing "access lists" (was: Must I use DISTINCT?)
Previous Message Zdravko Balorda 2009-02-06 14:03:18 count(distinct)