Re: speeding up COUNT and DISTINCT queries - Mailing list pgsql-performance

From Max Baker
Subject Re: speeding up COUNT and DISTINCT queries
Date
Msg-id 20030313010018.GN30411@warped.org
Whole thread Raw
In response to Re: speeding up COUNT and DISTINCT queries  ("Chad Thompson" <chad@weblinkservices.com>)
List pgsql-performance
On Wed, Mar 12, 2003 at 03:55:09PM -0700, Chad Thompson wrote:
> Ive found that group by works faster than distinct.
>
> Try
> EXPLAIN ANALYZE  select mac from node group by mac;

This was about 25% faster, thanks!

That will work for distinct() only calls, but I still am looking for a
way to speed up the count() command.  Maybe an internal counter of rows,
and  triggers?

-m

pgsql-performance by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: speeding up COUNT and DISTINCT queries
Next
From: Max Baker
Date:
Subject: Re: speeding up COUNT and DISTINCT queries