Re: Query Rewrite for Materialized Views (Postgres Extension)

Поиск
Список
Период
Сортировка
От Corey Huinker
Тема Re: Query Rewrite for Materialized Views (Postgres Extension)
Дата
Msg-id CADkLM=fGj104pdza=GgenarkSmA+V+P1voeg82mxiT=ZmO+Kww@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Query Rewrite for Materialized Views (Postgres Extension)  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: Query Rewrite for Materialized Views (Postgres Extension)  (Dent John <denty@QQdd.eu>)
Список pgsql-hackers
Hope it is useful or interesting for someone! Questions or comments are very welcome.

good idea.

Regards

Pavel

In a recent PgConf NYC presentation [1] I was talking about the technical hurdles to implementing materialized views that could be kept up to date at all times, and the benefits of having such a thing.

Some use cases can be addressed with eventually-consistent derivative table structures (Vertica's projections, PipelineDB's continuous views, etc), but those methods rely on the source data never having deletes or updates, or confining those updates to the "hot" part of the source tables, so it generally works for time-series data, but not for other cases.

It has occurred to me that Dave Fetter's work on ASSERTIONS [2] has common underpinnings with true continuous materialized views. In both cases, the creation of a system object causes the creations of insert/update/delete triggers on one or more existing tables. In the case of assertions, those triggers are run with the goal of raising an error if rows are returned from a query. In the case of a materialized view, those same triggers would be used to delete rows from a CMV and insert replacements rows. 

If we can get always-up-to-date materialized views, then Denty's work on query rewrite would have greatly enhanced utility.

 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Claudio Freire
Дата:
Сообщение: Re: Making all nbtree entries unique by having heap TIDs participatein comparisons
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Removing "Included attributes in B-tree indexes" section from docs