Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

postgres materialized views

horizondave's profile image horizondave posted 3 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 3 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 month ago Permalink

Hello,

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

To delete: DROP MATERIALIZED VIEW IF EXISTS view_name;

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.

Thanks

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




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.