From: Josh Berkus <josh@agliodbs.com>
To: pgsql-sql@postgresql.org
Subject: COUNT DISTINCT?
Date: Tue, 30 Jul 2002 14:27:18 -0700
Message-ID: <200207301427.18815.josh@agliodbs.com> (raw)
Folks,
Anybody know a keen shortcut for the following:
SELECT count(skip_date)
FROM (SELECT DISTINCT skip_date FROM weekend_list
WHERE ... ...) days_to_skip;
That's a double aggregate, and is bound to be dog-slow.
--
-Josh Berkus
Aglio Database Solutions
San Francisco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com
Subject: Re: COUNT DISTINCT?
In-Reply-To: <200207301427.18815.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox