Re: Query Rewrite with Postgres' materialized views - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Query Rewrite with Postgres' materialized views
Date
Msg-id CA+TgmoYXJ3oppuVdUSrTr5hewj1R7a1BmzZKsZdwGjPAWAeWnA@mail.gmail.com
Whole thread Raw
In response to Re: Query Rewrite with Postgres' materialized views  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Query Rewrite with Postgres' materialized views  (Eric Grinstein <ericgrinstein@gmail.com>)
List pgsql-hackers
On Sat, Feb 21, 2015 at 1:04 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> I'm not really sure what Josh was talking about in that answer.  In
>> terms of doing this automatically, I doubt that's likely to happen
>> until we have a way to automatically update a materialized view when
>> the underlying data changes --- and Kevin Grittner has done a bunch of
>> work towards that, but more is needed to get us there.
>
> Even with auto maintenance, it seems unlikely that matviews would ever
> be so transparent that it would be okay for the planner to automatically
> substitute them into a query.  The data in a matview is going to be at
> least a little bit stale, else You're Doing It Wrong.

Perhaps, but this is a feature we've gotten MANY customer requests
for.  IDK why, but it's true.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Query Rewrite with Postgres' materialized views
Next
From: Andrew Dunstan
Date:
Subject: Re: Bootstrap DATA is a pita