4

Can we create materialized views with partitions in PostgreSQL (version 10.7) ?

Thanks

Slava Rozhnev
  • 9,510
  • 6
  • 23
  • 39
Babar
  • 65
  • 1
  • 7

1 Answers1

2

No, you cannot, and it is not easy to think of a use case for that.

True, some carefully designed queries can be faster on a partitioned table, but most queries become slower.

You can work around the “deficiency” by creating a table and filling it with INSERT INTO ... SELECT ....

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
  • 1
    > a use case for that. Aggregations / reporting e.g. https://www.postgresql.org/message-id/0974f793-e5aa-71a9-aec1-01b7bed7162b%40gmail.com – Mauricio Scheffer Apr 21 '22 at 12:59