Create a BigQuery materialized view with automatic incremental refresh for a frequently queried aggregation

domain: cloud.google.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Write a CREATE MATERIALIZED VIEW statement over a supported aggregation query (e.g. GROUP BY with supported aggregate functions) against a base table.
  2. Configure OPTIONS such as enable_refresh, refresh_interval_minutes, and max_staleness to control how the cached data stays current.
  3. Rely on BigQuery's automatic incremental refresh, which by default refreshes cached results within roughly 5-30 minutes of a base table change rather than a full recompute.
  4. Confirm smart tuning is automatically rewriting eligible queries against the base table to use the materialized view, even when the query doesn't reference it directly.
  5. Use materialized view management commands/console to inspect refresh history and staleness before relying on it for latency-sensitive dashboards.

Known gotchas

Related routes

Design a BigQuery materialized view that qualifies for incremental refresh and automatic query rewrite
data-engineering · 6 steps · unrated
Create a TimescaleDB continuous aggregate with an incremental refresh policy and enable real-time aggregation for sub-interval queries
docs.timescale.com · 6 steps · unrated
Build a ClickHouse Materialized View to pre-aggregate event counts in real time
clickhouse.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans