Cliff Resnick
10/06/2026, 8:14 PMRocky
10/06/2026, 8:14 PMdefault_catalog.
* Benefit: This is the most common way to accelerate data lake queries by bringing a precomputed snapshot into StarRocks' high-performance engine.
* Syntax Example:
sql
CREATE MATERIALIZED VIEW my_mv
DISTRIBUTED BY HASH(id)
REFRESH ASYNC EVERY (INTERVAL 1 HOUR)
AS
SELECT id, name FROM iceberg_catalog.db.table;
2. External Materialized Views (Storage in the Data Lake)
Starting with more recent versions (specifically v3.4 and v3.5), StarRocks introduced "External Materialized Views." These are materialized views where the data is stored directly in the external catalog (e.g., as an Apache Iceberg table) rather than within StarRocks itself.
* Supported Catalogs: Primarily Apache Iceberg (v3.4+) and Hive (with write capabilities in v3.3+).
* Storage: The precomputed results are stored in your data lake (S3/HDFS) as physical files managed by the external catalog's metadata (like Iceberg).
* Purpose: This allows StarRocks to act as a transformation engine for your lakehouse, where the results of the MV can also be consumed by other engines (like Spark or Trino) since the data lives in the open lake format.
* Syntax Example:
sql
-- Note the catalog prefix in the MV name
CREATE MATERIALIZED VIEW iceberg_catalog.target_db.external_mv
REFRESH ASYNC EVERY (INTERVAL 1 DAY)
AS
SELECT ... FROM source_catalog.db.table;
Key Differences & Limitations
Feature | Standard MV (Internal Storage) | External MV (Lake Storage)
Data Format | StarRocks native format (optimized for SR) | Open formats (e.g., Parquet in Iceberg)
Consumption | Only accessible via StarRocks | Accessible by StarRocks, Spark, Trino, etc.
Performance | Highest (native indexing/caching) | Slightly lower (network I/O to lake)
Rewrite | Transparent query rewrite supported | Rewrite supported (v3.5+)
Refresh | Manual, Fixed Interval | Manual, Fixed Interval
Note on Refresh: Materialized views based on external tables do not support automatic refresh triggered by data changes in the base table (since external systems don't send "change notifications" to StarRocks). You must use a fixed-interval schedule or manual refresh.
For more specific details, you can refer to the StarRocks documentation on Data Lake Acceleration.
References
• data_source/feature-support-data-lake-analytics.md
• data_source/catalog/iceberg/iceberg_catalog.md
• using_starrocks/async_mv/use_cases/data_lake_query_acceleration_with_materialized_views.md
• data_source/External_table.md