Re: Configuration Advice - Mailing list pgsql-performance

From Chad Wagner
Subject Re: Configuration Advice
Date
Msg-id 81961ff50701171601n5ce08c2dq5b56729b59468448@mail.gmail.com
Whole thread Raw
In response to Re: Configuration Advice  (Steve <cheetah@tanabi.org>)
List pgsql-performance
On 1/17/07, Steve <cheetah@tanabi.org> wrote:
        However, I will look into this and see if I can figure out this
average value.  This may be a valid idea, and I'll look some more at it.

It must be, Oracle sells it pretty heavily as a data warehousing feature  ;).  Oracle calls it a materialized view, and the basic premise is you have a "change" log (called a materialized log by Oracle) and you have a job that runs through the change log and applies the changes to the materialized view.

If you are using aggregates, be careful and make sure you use simple forms of those aggregates.  For example, if you are using an "average" function then you should have two columns sum and count instead.  Some aggregates are too complex and cannot be represented by this solution and you will find that you can't update the summary tables, so definitely try to stay away from complex aggregates if you do not need them.

Here is a link to a PL/pgSQL effort that tries to simulate materialized views:

http://jonathangardner.net/PostgreSQL/materialized_views/matviews.html

I don't know how complete it is, and it looks like there was a project started but has been abandoned for the last 3 years.

--
Chad
http://www.postgresqlforums.com/

pgsql-performance by date:

Previous
From: Steve
Date:
Subject: Re: Configuration Advice
Next
From: Chris Browne
Date:
Subject: Re: Configuration Advice