I am wondering whether the following two forms of SELECT statements are
SELECT COUNT( DISTINCT table.column ) ...
SELECT DISTINCT COUNT( * ) ...
If they are the same, then why is the latter query much slower in
postgres when applied to the same FROM and WHERE clauses?
Furthermore, is there a better way of performing this sort of operation
in postgres (or just in SQL in general)?
Thomas F. O'Connell
Co-Founder, Information Architect
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
pgsql-sql by date
|Next:||From: Stephan Szabo||Date: 2004-11-16 20:03:35|
|Subject: Re: Counting Distinct Records|
|Previous:||From: Pierre-Frédéric Caillaud||Date: 2004-11-16 18:51:31|
|Subject: Re: tree structure photo gallery date quiery|