pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Reading on how materialized views are materialized?
2+ messages / 2 participants
[nested] [flat]

* Reading on how materialized views are materialized?
@ 2018-06-22 18:51  Wells Oliver <wells.oliver@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Wells Oliver @ 2018-06-22 18:51 UTC (permalink / raw)
  To: pgsql-admin

Where can I find some more detail? I am deciding between a flat table
populated for the current month only with a script versus a materialized
view, and I'd like to understand better if the latter is intelligently
being refreshed (meaning years of data won't be re-populated, only what's
changed).

Thanks.

-- 
Wells Oliver
wells.oliver@gmail.com <wellsoliver@gmail.com>

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Reading on how materialized views are materialized?
@ 2018-06-25 06:23  Thomas Kellerer <spam_eater@gmx.net>
  parent: Wells Oliver <wells.oliver@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Thomas Kellerer @ 2018-06-25 06:23 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Wells Oliver schrieb am 22.06.2018 um 20:51:
> Where can I find some more detail? I am deciding between a flat table
> populated for the current month only with a script versus a
> materialized view, and I'd like to understand better if the latter is
> intelligently being refreshed (meaning years of data won't be
> re-populated, only what's changed).


MViews currently don't support "incremental" refresh in Postgres. 

A refresh of a mview is essentially the same as:

  truncate table foo;
  insert into foo 
  select ...
  from ....;

Where the SELECT part is the query used to define the mview. 








^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-06-25 06:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-06-22 18:51 Reading on how materialized views are materialized? Wells Oliver <wells.oliver@gmail.com>
2018-06-25 06:23 ` Thomas Kellerer <spam_eater@gmx.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox