@cliff a couple other tips:
- Every time
couch2pg
it runs, it calls the refresh_matviews() function so data in materialized views is kept up to date - Depending on how much data you have and how performant the query is that defines your materialized view, refreshing the matviews can take some time
- Materialized views are not refreshed in any particular order so be mindful of dependencies between materialized views (ie one materialized view probably shouldn’t depend on another one)
- Since the matviews are refreshed
CONCURRENTLY
, you MUST have aUNIQUE
index defined for every materialized view.