postgres materialized views

horizondave's profile image horizondave posted 5 years ago in General Permalink

Please, please, please can we have support for Postgres Materialized Views in the object tree? Being able to treat them like tables from a data POV would just be absolutely perfect.

ansgar's profile image ansgar posted 5 years ago Permalink

This is issue #40. But there's quite little details there, so you could probably post some real example on how to create such a view and how to display it afterwards.

GHuftier's profile image GHuftier posted 1 year ago Permalink


To create a materialized view: CREATE MATERIALIZED VIEW view_name AS ...


To get the mateirialized views list: select schemaname as schema_name, matviewname as view_name, matviewowner as owner, ispopulated as is_populated, definition from pg_matviews order by SCHEMA_NAME, view_name;

schema_name - schema name view_name - materialized view name owner - name of materialized view's owner is_populated - indicate if materialized view is currently populated (false means that view is unscannable and cannot be queried until REFRESH MATERIALIZED VIEW is used) definition - materialized view script - select statement only

Materialized view is like a table with content populated from a query. It could have indexes.

It's really usefull with big dataset.


Please login to leave a reply, or register at first.