pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: Olgierd Michalak <olgierdm@softcomputer.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: How to implement Aggregate Awareness?
Date: Sat, 05 Nov 2011 11:35:08 +0800
Message-ID: <4EB4AEEC.6050408@ringerc.id.au> (raw)
In-Reply-To: <F8991549C624E2429C578E86D68A4D027F42A9C9@EXCH-MBX01.softcomputer.com>
References: <F8991549C624E2429C578E86D68A4D027F42A9C9@EXCH-MBX01.softcomputer.com>

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



view thread (5+ messages)  latest in thread

Message-ID: <4EB4AEEC.6050408@ringerc.id.au>
Permalink:  ../4EB4AEEC.6050408@ringerc.id.au/
Also on:    postgresql.org/message-id/4EB4AEEC.6050408@ringerc.id.au

 · 

reply

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: ringerc@ringerc.id.au, olgierdm@softcomputer.com
  Subject: Re: How to implement Aggregate Awareness?
  In-Reply-To: <4EB4AEEC.6050408@ringerc.id.au>

* 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