Bailey Kocin
03/27/2026, 4:15 PMRocky
03/27/2026, 4:15 PMFILES()), your data flow looks like this:
1. Base Data: Resides on S3 (high latency, low cost).
2. Materialized View: When the MV refreshes, StarRocks pulls data from S3, performs the joins/aggregations, and writes the results to the BE disks.
3. Query Execution: When you query the MV, StarRocks uses the pre-computed results stored on the fast local disks of your BEs.
3. The Role of the Compute Node Cache
While the "source of truth" for your MV is on the BE disks, CNs do have a Data Cache. However, this cache is primarily used to speed up access to remote data (like your base tables on S3).
For the MV itself:
* If a query plan assigns a fragment to a CN, that CN will fetch the required data from the BEs.
* If a query plan assigns the fragment to a BE, it reads directly from its local disk.
Why this is great for your "Heavy Joins" use case:
By using MVs in this hybrid setup, you are essentially creating a high-performance local "cache" of your S3 data.
* Performance: You avoid the S3 network bottleneck during query time because the heavy joins are already pre-computed and sitting on local NVMe/SSD (on the BEs).
* Elasticity: You can scale your CNs up and down based on how many "heavy" concurrent queries you have, without having to move or rebalance the actual MV data stored on the BEs.
Pro-tip: When creating your MV, make sure to define a good DISTRIBUTED BY HASH key that aligns with your most frequent join columns to ensure the data is distributed optimally across your BE nodes!
Does that help clarify the "where" and "how" of your data modeling? Let me know if you want to dive deeper into refresh strategies!
References
• introduction/Architecture.md
• table_design/table_design.md
• quick_start/shared-data.md
• administration/management/resource_management/be_label.md
• using_starrocks/async_mv/Materialized_view.mdBailey Kocin
03/27/2026, 4:18 PMRocky
03/27/2026, 4:18 PMREFRESH ASYNC property (e.g., EVERY (INTERVAL 1 HOUR)). StarRocks manages the refresh task internally. If you have nested MVs (an MV built on another MV), StarRocks can handle the cascading refresh automatically.
* Cronjob + Manual Tables: You are responsible for the orchestration. You need an external tool (like Airflow, dbt, or a custom script) to trigger INSERT INTO ... SELECT ... from the S3 external catalog into your local StarRocks tables. You must manually handle retries, failures, and dependency logic between tables.
2. Intelligent Partition Refresh
This is the biggest advantage of MVs for large S3 datasets:
* Asynchronous MVs: If your S3 data is in a supported format (like Hive or Iceberg catalogs), StarRocks can automatically detect which partitions have changed. When the refresh interval triggers, it only updates the specific partitions that are new or modified. You don't have to write any logic to "find the new data."
* Manual Cronjob: To avoid a full overwrite of the table every time (which is slow and expensive), your script must manually calculate which partitions to load (e.g., WHERE date = 'yesterday'). If a backfill is needed or old data changes on S3, you have to update your script logic manually.
3. Transparent Query Rewrite
This is a "killer feature" for MVs that manual tables do not have:
* Asynchronous MVs: Even if your application sends a query against the original S3 external table, StarRocks can automatically and transparently rewrite that query to fetch data from the Materialized View instead. This gives you the performance of local storage without requiring you to change your application's SQL code.
* Manual Tables: Your application must be explicitly programmed to query the local StarRocks table name. If you ever drop that table or rename it, your application breaks.
4. Data Consistency & "Staleness"
* Asynchronous MVs: You can control the trade-off between performance and freshness using the mv_rewrite_staleness_second property. For example, if you set it to 3600, StarRocks will use the MV for query rewrite even if it hasn't been refreshed in the last hour. If the MV is "too stale," StarRocks can automatically fall back to the slow S3 table to ensure you get correct results.
* Manual Tables: There is no built-in staleness check. If your cronjob fails and the local table is 3 days old, your queries will simply return old data without warning.
5. Maintenance Overhead
* MVs: Use ALTER MATERIALIZED VIEW to change refresh schedules or properties. Schema changes in the base S3 table can be propagated via the MV refresh mechanism more gracefully.
* Manual Tables: You manage the DDL for the destination table. If the S3 schema changes, you must manually ALTER your local table and update your loading script.
Comparison Summary
Feature | Asynchronous MV | Manual Cronjob + Table
Orchestration | Built-in to StarRocks | External (Airflow/Cron)
Partitioning | Auto-detects changed partitions | Manual logic required
Query Rewrite | Yes (Automatic acceleration) | No (Manual SQL changes)
Staleness Control | Built-in via properties | Manual monitoring
Setup Effort | Low (Declarative SQL) | Medium (Scripting + DDL)
Rocky's Recommendation
For your use case of 1:1 replicas for heavy joins, Asynchronous Materialized Views are almost always the better choice.Rocky
03/27/2026, 4:18 PMBailey Kocin
03/27/2026, 5:45 PMRocky
03/27/2026, 5:46 PMadaptive strategy allows the system to intelligently adjust the number of partitions refreshed in each batch based on the data volume.
* Property: "partition_refresh_strategy" = "adaptive"
* Property: "partition_refresh_number" (Controls the granularity; defaults to 1 since v3.3 to prevent OOM).
* Documentation Link: Create a partitioned materialized view - Refresh granularity
*3. Partition-Level Change Detection for External Catalogs*
A key part of "Intelligent Refresh" is the support for detecting changes in external tables (Hive, Iceberg, Paimon, etc.) at the partition level to avoid full refreshes.
* Documentation Link: Data lake query acceleration with materialized views - Choose a suitable refresh strategy
Summary of Key Parameters:
Parameter | Description
partition_refresh_number | Maximum partitions to refresh in a single batch.
partition_refresh_strategy | Set to adaptive for StarRocks to automatically adjust batch sizes based on resources.
partition_ttl_number | Number of most recent partitions to keep, allowing for partial data materialization.
If you are looking for the specific PR or technical detail mentioned in release blogs, it generally relates to the enhanced partition tracking and batch splitting logic introduced to make MV maintenance more stable and efficient.
References
• using_starrocks/async_mv/use_cases/create_partitioned_materialized_view.md
• using_starrocks/async_mv/feature-support-asynchronous-materialized-views.mdBailey Kocin
03/27/2026, 5:53 PMRocky
03/27/2026, 5:53 PMrun_mode is that StarRocks defaults to shared_nothing mode, and this mode fully supports External Catalogs and Data Cache.
Here is a breakdown of why your current "hybrid" setup works and how it differs from a true Shared-data architecture.
1. Why it works (The Default Mode)
When run_mode is not set, it defaults to shared_nothing. In this mode:
* External Storage: You can create External Catalogs (e.g., Hive, Iceberg, or S3/HDFS-based catalogs) to query data directly from shared storage.
* Compute Nodes (CN): You can add stateless Compute Nodes to your cluster. These nodes are designed to handle the compute for external queries without storing local replicas of internal tables.
* Data Cache: Both BE (Backend) and CN (Compute) nodes can use the Data Cache feature to store frequently accessed data from these external catalogs on local disks (SSD/NVMe) to speed up subsequent queries.
2. Is it fundamentally different from Shared-data mode?
Yes. Even though your setup "feels" like a shared-data architecture because you are querying shared storage with cached compute nodes, there is a fundamental difference in how Internal (Native) Tables are handled.
Feature | Your Current Setup (shared_nothing) | Shared-data Mode (run_mode = shared_data)
Internal Tables | Stored on local BE disks and replicated (coupled storage/compute). | Stored on Object Storage (S3/GCS/HDFS). Only metadata is local.
External Tables | Stored on shared storage (Catalogs). | Stored on shared storage (Catalogs).
Scaling Internal Data | Adding/removing BEs requires data rebalancing (shuffling shards). | Adding/removing CNs is **instant**; no data rebalancing is needed.
Data Cache | Used to accelerate External Catalog queries. | Used to accelerate both Internal and External queries.
Resilience | Relies on local replication for internal table availability. | Relies on the high availability of the object store.
Summary
Your current "hybrid" architecture is essentially a Shared-nothing cluster acting as a Query Engine for a Data Lake. This is a very common and high-performance pattern.
However, if you wanted your StarRocks native tables (the ones you CREATE TABLE without a catalog) to also reside on S3 and benefit from instant scaling without rebalancing, you would need to deploy a new cluster with run_mode = shared_data. Note that you cannot switch an existing cluster between these modes after deployment.
If you have more questions about configuring your cache or compute nodes, feel free to ask!
References
• deployment/shared_data/feature-support-shared-data.md
• introduction/Architecture.md
• data_source/data_cache.mdBailey Kocin
03/27/2026, 6:38 PMRocky
03/27/2026, 6:38 PMBailey Kocin
03/27/2026, 6:44 PMRocky
03/27/2026, 6:44 PM