Re: Materialized views WIP patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Materialized views WIP patch
Date
Msg-id 17034.1362353948@sss.pgh.pa.us
Whole thread Raw
In response to Re: Materialized views WIP patch  (Nicolas Barbier <nicolas.barbier@gmail.com>)
Responses Re: Materialized views WIP patch  (Josh Berkus <josh@agliodbs.com>)
Re: Materialized views WIP patch  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Nicolas Barbier <nicolas.barbier@gmail.com> writes:
> 2013/3/3 Kevin Grittner <kgrittn@ymail.com>:
>> Nicolas Barbier <nicolas.barbier@gmail.com> wrote:
>>> I think that automatically using materialized views even when the
>>> query doesn’t mention them directly, is akin to automatically
>>> using indexes without having to mention them in the query.

>> Oh, I understand that concept perfectly well, I just wonder how
>> often it is useful in practice.

There's a much more fundamental reason why this will never happen, which
is that the query planner is not licensed to decide that you only want
an approximate and not an exact answer to your query.

If MVs were guaranteed always up-to-date, maybe we could think about
automatic use of them --- but that's a far different feature from what
Kevin has here.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: buffer assertion tripping under repeat pgbench load
Next
From: Tom Lane
Date:
Subject: Re: CREATE RULE "_RETURN" and toast tables