Re: Aggregate functions, fast! (long) - Mailing list pgsql-sql

From Ang Chin Han
Subject Re: Aggregate functions, fast! (long)
Date
Msg-id 20000809153337.A6032@pintoo.com
Whole thread Raw
In response to Aggregate functions, fast! (long)  (Ang Chin Han <angch@pintoo.com>)
List pgsql-sql
On Wed, Aug 09, 2000 at 02:53:45PM +0800, Ang Chin Han wrote:

> The queries making use of these might be rewritten as:
>   1.  select min(a) from t_sum; -- same as above, 
>                                 -- but we've less rows to scan
>   2.  select cnt from t_sum where a = 1 and b = 3;

Sorry, bugfix:       select sum(cnt) from t_sum where a = 1 and b = 3; since c is not referenced.

>   3.  select sum(d * cnt) as sum from t_sum where a = 1 and c > 3;
>   4.  select sum(b * cnt) / cnt as avg from t_sum where c = 1;


pgsql-sql by date:

Previous
From: Ang Chin Han
Date:
Subject: Aggregate functions, fast! (long)
Next
From: "luc00"
Date:
Subject: any tool "return query results to a grid "