Query Rewrite for Materialized Views (FDW Extension)

Поиск
Список
Период
Сортировка
От Dent John
Тема Query Rewrite for Materialized Views (FDW Extension)
Дата
Msg-id FC784A9F-F599-4DCC-A45D-DBF6FA582D30@QQdd.eu
обсуждение исходный текст
Ответы Re: Query Rewrite for Materialized Views (FDW Extension)  (Jim Finnerty <jfinnert@amazon.com>)
Список pgsql-hackers
Hi,

I wanted to share the project I've been working on which dynamically rewrites queries to target materialized views when
viewsare available that can satisfy part of a query with lower cost plans. 

I embarked upon as an interesting side project. It took me a bit more time than I anticipated, but the result works for
myuse case. Because of that, I thought it worth sharing. However I would caution that my use case is not exactly of a
commercialscale... so please heed the following obligatory warning: 

**NOTE: this is not "production ready" code — if it works for you, then great, but use it after thorough testing, and
withappropriate caution.** 

There are some limitations to the rewrite opportunities it takes up, and it will almost certainly fail on complex
materializedviews composed of deeply nested queries. 

The extension does not have extensive (actually: any) documentation, but the few test cases should make obvious to the
inclinedreader how it works. This is deliberate at this early a stage: I don't want to encourage uninformed adoption
becauseof the possibility of data loss or incorrect query rewrites. 

The extension is written against a Postgres 10.1 source tree.

Source code: https://github.com/d-e-n-t-y/pg_fdw_mv_rewrite

Questions or comments are very welcome.

denty.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: typcategory for regconfig
Следующее
От: David Rowley
Дата:
Сообщение: Re: [HACKERS] Runtime Partition Pruning