Re: Materialized views proposal - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Materialized views proposal
Date
Msg-id 1069867174.2749.18.camel@fuji.krosing.net
Whole thread Raw
In response to Materialized views proposal  (Jonathan Gardner <jgardner@jonathangardner.net>)
Responses Re: Materialized views proposal  (Jonathan Gardner <jonagard@amazon.com>)
List pgsql-hackers
Jonathan Gardner kirjutas K, 26.11.2003 kell 19:03:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I apologize if this post is inappropriate.
> 
> Doing some development work, me and my co-worker discussed some 
> optimizations strategies. One of the ideas that came up was materialized 
> views. Trading disk space to summarize queries, and paying for a trigger 
> waterfall on certain kinds of updates seems like a small price to pay right 
> now in our situation.
> 
> I searched through the archives and I couldn't seem to find anything 
> relevant.
> 
> As I've no familiarity with the internals, but I do know the front-end 
> pretty well, what can I do to help implement materialized views? 

First, You could start by implementing materialized views manually,
using tables and triggers, to get the feel of what should be generated.

Next, still working from frontend, try to make some code (probably in
some RAD/scripring language) which does the transform from CREATE VIEW
(or whatever) syntax (or manually constructed syntax tree) into create
table + create trigger statements.

If you have the above working well, talk about moving this to backend.

> Is such an 
> idea feasible? Is there some reason why it just isn't a good idea? (And if 
> not, what is a better idea?)
> 
> If someone is willing to guide me, I can probably contribute a fair amount 
> of C code. I do have experience with C.

What is needed is good algorithms. Writing C code is secondary to that.

Similar problem has kept us from implementing updatable views for quite
some time.

--------------------
Hannu



pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: building outside source tree
Next
From: Greg Stark
Date:
Subject: Re: pg_restore and create FK without verification check