From: | Craig Ringer <ringerc(at)ringerc(dot)id(dot)au> |
---|---|
To: | Olgierd Michalak <olgierdm(at)softcomputer(dot)com> |
Cc: | "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: How to implement Aggregate Awareness? |
Date: | 2011-11-05 03:35:08 |
Message-ID: | 4EB4AEEC.6050408@ringerc.id.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Gabriel Filipiak | 2011-11-06 17:06:32 | Problem with pivot tables |
Previous Message | John Fabiani | 2011-11-05 00:12:09 | Re: the use of $$string$$ |