0

[Question posted by a user on YugabyteDB Community Slack]

I was reading the recent article "YugabyteDB 2.15: Enable Developers to Build Quicker and Ship Faster" and saw this:

Materialized views recompute in the background when the base tables change. Therefore, any incremental data changes from the base tables are automatically added to the materialized views. Materialized views return fresh data. If changes to base tables might invalidate the materialized view, then data reads directly from the base tables.

On the other hand the documentation describes traditional postgres behavior requiring a manual REFRESH MATERIALIZED VIEW. Which is correct for current functionality? If it's the documentation, is the blog post describing upcoming functionality? Automatic refreshes with a fallback to the base tables would be quite nice!

dh YB
  • 965
  • 3
  • 10

1 Answers1

0

The documentation describes the current functionality - currently, we require a manual REFRESH The upcoming pg_cron extension feature (https://github.com/yugabyte/yugabyte-db/issues/11908) should help us achieve some level of automation. If you were thinking about automatic refresh on commit to have always fresh data, or transparent query rewrite to read from the base table when the materialized view is stale, we don't have it yet. Basically, we have the same as PostgreSQL materialized views.

dh YB
  • 965
  • 3
  • 10