Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] [SQL] Materialized View Summary

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: "Jonathan M(dot) Gardner" <jgardner(at)jonathangardner(dot)net>,pgsql-hackers(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org,pgsql-performance(at)postgresql(dot)org
Subject: Re: [HACKERS] [SQL] Materialized View Summary
Date: 2004-02-24 21:48:49
Message-ID: 1077659329.15366.6061.camel@camel (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-performancepgsql-sqlpgsql-www
On Tue, 2004-02-24 at 12:11, Richard Huxton wrote:
> On Tuesday 24 February 2004 16:11, Jonathan M. Gardner wrote:
> >
> > I've written a summary of my findings on implementing and using
> > materialized views in PostgreSQL. I've already deployed eagerly updating
> > materialized views on several views in a production environment for a
> > company called RedWeek: http://redweek.com/. As a result, some queries
> > that were taking longer than 30 seconds to run now run in a fraction of a
> > millisecond.
> >
> > You can view my summary at
> > http://jonathangardner.net/PostgreSQL/materialized_views/matviews.html


have you done much concurrency testing on your snapshot views? I
implemented a similar scheme in one of my databases but found problems
when I had concurrent "refresh attempts".  I ended up serializing the
calls view LOCKing, which was ok for my needs, but I thought potentially
problematic in other cases.

> 
> Interesting (and well written) summary. Even if not a "built in" feature, I'm 
> sure that plenty of people will find this useful. Make sure it gets linked to 
> from techdocs.

Done. :-)

> 
> If you could identify candidate keys on a view, you could conceivably automate 
> the process even more. That's got to be possible in some cases, but I'm not 
> sure how difficult it is to do in all cases.
>

it seems somewhere between Joe Conways work work arrays and polymorphic
functions in 7.4 this should be feasible. 

 
Robert Treat
-- 
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2004-02-24 22:16:08
Subject: Re: Column correlation drifts, index ignored again
Previous:From: Kevin BrownDate: 2004-02-24 21:24:19
Subject: Re: Column correlation drifts, index ignored again

pgsql-www by date

Next:From: Jonathan GardnerDate: 2004-02-24 22:19:39
Subject: Re: [HACKERS] [SQL] Materialized View Summary
Previous:From: Chris GamacheDate: 2004-02-24 18:58:06
Subject: tsearch2 trigger alternative

pgsql-hackers by date

Next:From: Jonathan GardnerDate: 2004-02-24 22:19:39
Subject: Re: [HACKERS] [SQL] Materialized View Summary
Previous:From: Shelby CainDate: 2004-02-24 19:58:56
Subject: select statement against pg_stats returns inconsistent data

pgsql-sql by date

Next:From: Jonathan GardnerDate: 2004-02-24 22:19:39
Subject: Re: [HACKERS] [SQL] Materialized View Summary
Previous:From: Chris GamacheDate: 2004-02-24 18:58:06
Subject: tsearch2 trigger alternative

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group