starrocks-materialized-views

Create and manage StarRocks materialized views with refresh and rewrite tuning.

14|1|Updated May 5, 2026
One-click install
npx skills add https://github.com/ivanshamaev/de-agent-skills --skill starrocks-materialized-views
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: starrocks-materialized-views
Source: https://github.com/ivanshamaev/de-agent-skills/tree/main/group_skills/starrocks_group_skills/starrocks_materialized_views
Command: npx skills add https://github.com/ivanshamaev/de-agent-skills --skill starrocks-materialized-views

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you build and manage StarRocks materialized views so analytics queries can run faster via automatic query rewrite and pre-aggregation, without manually rewriting every dashboard query.

Core Features & Use Cases

  • Create synchronous and asynchronous materialized views: design rollup MVs for single-table aggregates and async MVs for joins, expressions, external tables, and nested MVs.
  • Tune refresh and staleness behavior: choose REFRESH ASYNC, SCHEDULED, or MANUAL, configure partition-aware refresh properties, and control query rewrite staleness.
  • Debug and verify query rewrite: use EXPLAIN/EXPLAIN VERBOSE and MV state settings to understand why a query is or is not rewritten to an MV.

Quick Start

Load this Skill to create a StarRocks asynchronous materialized view that pre-aggregates daily KPIs and then verify rewrite using EXPLAIN.

Frequently Asked Questions about starrocks-materialized-views

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I accelerate slow StarRocks queries on Iceberg and Hive external tables?

To accelerate StarRocks queries on Iceberg and Hive external tables, create asynchronous materialized views for pre-aggregation. This allows the query engine to automatically rewrite analytical queries to use the MVs instead of scanning the underlying lakehouse data directly.

What is the difference between synchronous and asynchronous materialized views in StarRocks?

Synchronous materialized views in StarRocks handle single-table rollup aggregates with automatic data updates, while asynchronous MVs support joins, expressions, external tables, and nested multi-level pre-aggregation with scheduled, manual, or partition-aware refresh behaviors.

How do I check why my StarRocks query is not being rewritten to use a materialized view?

To check why a StarRocks query is not being rewritten to use a materialized view, run EXPLAIN or EXPLAIN VERBOSE on your query. Additionally, inspect MV state settings and verify staleness configurations to ensure rewrite eligibility requirements are met.

How do I configure partition-aware refresh for StarRocks asynchronous materialized views?

To configure partition-aware refresh for StarRocks asynchronous materialized views, use REFRESH ASYNC, SCHEDULED, or MANUAL clauses in your DDL. This ensures only specific partitions are updated, optimizing refresh overhead for large lakehouse datasets.

Can I build nested multi-level materialized views in StarRocks for BI dashboards?

Yes, you can build nested multi-level materialized views in StarRocks to accelerate BI dashboards. Asynchronous MVs support nested pre-aggregation, allowing complex analytical queries to be transparently rewritten across multiple layers of derived data.