Re: How to implement Aggregate Awareness? - Mailing list pgsql-sql

From Craig Ringer
Subject Re: How to implement Aggregate Awareness?
Date
Msg-id 4EB4AEEC.6050408@ringerc.id.au
Whole thread Raw
In response to How to implement Aggregate Awareness?  (Olgierd Michalak <olgierdm@softcomputer.com>)
Responses Re: How to implement Aggregate Awareness?  (Olgierd Michalak <olgierdm@softcomputer.com>)
List pgsql-sql
On 11/05/2011 05:03 AM, Olgierd Michalak wrote:

> Simply put, when Transparent (to the reporting tool) Aggregate Navigator
> recognizes that a query would execute faster using aggregates, it
> automatically rewrites the query so that the database hits the smaller
> aggregates rather than larger detail tables upon which the small
> aggregates are pre-computed.

Assuming I understand what you want correctly: Before you could usefully 
do anything like that, I think you'd need to implement full support for 
materialized views.

Once that's in place, the optimizer could potentially be enhanced to 
recognise queries against a base table and rewrite it to use a 
materialized view of the table when it sees that the query only touches 
data collected by the materialized view.

Right now, there isn't really anything for query rewriting like this to 
/target/ .

--
Craig Ringer


pgsql-sql by date:

Previous
From: John Fabiani
Date:
Subject: Re: the use of $$string$$
Next
From: Gabriel Filipiak
Date:
Subject: Problem with pivot tables