Re: Materialized views proposal

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Jonathan Gardner <jgardner(at)jonathangardner(dot)net>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Materialized views proposal
Date: 2003-11-26 17:19:34
Message-ID: 1069867174.2749.18.camel@fuji.krosing.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2003-11-26 17:24:38 Re: pg_restore and create FK without verification check
Previous Message nobody 2003-11-26 17:17:26 Re: Build farm