Re: [GENERAL] Materialized view vs. view - Mailing list pgsql-general

From Nicolas Paris
Subject Re: [GENERAL] Materialized view vs. view
Date
Msg-id 20170110213008.GC5870@gmail.com
Whole thread Raw
In response to Re: [GENERAL] Materialized view vs. view  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
Le 10/33/2017 à 21:33, David G. Johnston écrivait :
>    On Tue, Jan 10, 2017 at 1:01 PM, Melvin Davidson
>    <[1]melvin6925@gmail.com> wrote:
>
>    Can we all agree that the "Materialized View" should be faster
>    ​
>
Yes.
The OP told about a 500K rows view. Every select queries on that view will
have to fetch those 500K rows before - in any case this is quite slow.
However, 500K rows do not represent a huge physical space to
materialize. But do not forget to index/refresh the materialized views,
depending on the select set of queries to run.

Answer would have been different with 50K rows I guess.

>
>    If you add in the condition that the same answer has to be returned
>    whether you query the view or the mat-view then no, I wouldn't agree;
>    and the original question is, IMO, unanswerable (or at least, if
>    answered, requires making assumptions that tend to go unstated).
>
>     is just an opinion and too late to change at this point?
>
>    Your opinion, or the name? :)
>    ​David J.​
>
> References
>
>    1. mailto:melvin6925@gmail.com


pgsql-general by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: [GENERAL] Materialized view vs. view
Next
From: "Craig Boucher"
Date:
Subject: [GENERAL] Table Design for Many Updates