From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Job <Job(at)colliniconsulting(dot)it> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: R: Partitioned "views" |
Date: | 2017-01-22 21:37:51 |
Message-ID: | 20170122213751.GL18360@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Greetings,
* Job (Job(at)colliniconsulting(dot)it) wrote:
> >>The mat view takes longer and longer to update because it runs the full query. What you really want to do is have a side-table that you update regularly with appropriate SQL to issue UPDATE statements for just the current day (or whatever).
>
> If correct, i leave only last datas into "side-table" and syncronize only these datas in the materialized view.
> If i delete datas from the side-table (ex- truncate) during the next materialized view update they will be lost or remain intact?
I was suggesting that you, essentially, write your own SQL to have a
materialized view, *not* use the PG materialized view system.
In other words, the 'side-table' that you create would be *your*
materialized view, but to PG, it'd just look like a regular table.
You can't modify a PG materialized view.
Thanks!
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Shchapov | 2017-01-23 11:32:31 | Detailed progress reporting for "vacuuming indexes" stage |
Previous Message | Job | 2017-01-22 21:29:44 | R: Partitioned "views" |