Re: Constraint exclusion-like behavior for UNION ALL views - Mailing list pgsql-general

From David G. Johnston
Subject Re: Constraint exclusion-like behavior for UNION ALL views
Date
Msg-id CAKFQuwbgNhdFMxDp0hZAi71kdtmQQK37-3K1mJBH-10ocdYZ7w@mail.gmail.com
Whole thread Raw
In response to Constraint exclusion-like behavior for UNION ALL views  (Tony Cebzanov <tonycpsu@gmail.com>)
List pgsql-general
On Wed, Mar 29, 2017 at 12:19 PM, Tony Cebzanov <tonycpsu@gmail.com> wrote:
Are either of these things that could be supported in the future?  If not, is there a better way to get this kind of behavior so that materialized views are more useful when the amount of data increases and it's not feasible to update them in their entirety?

​The current implementation of materialized views has limitations​, some of which you've listed.  Materialized Views can be (and previously were) manually implemented using triggers - and you can still do so.  I recall seeing some recent blog articles discussing various schemes for materialized views and their pros and cons.

That said, I'm not sure what using materialized views instead of normal tables buys you in the first place.  I could see possibly using a materialized view as the current month's table but the historical tables usually don't require refreshing.

David J.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Handling psql lost connections
Next
From: Tony Cebzanov
Date:
Subject: Re: Constraint exclusion-like behavior for UNION ALL views