count(distinct)

From: Zdravko Balorda <zdravko(dot)balorda(at)siix(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: count(distinct)
Date: 2009-02-06 14:03:18
Message-ID: 498C4326.8080500@siix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Hi,

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.

Best regards, Zdravko

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2009-02-06 14:35:22 Re: count(distinct)
Previous Message Boycott TechForums 2009-02-06 10:41:44 test