Eliezer Talker
07/03/2026, 7:46 PMRocky
07/03/2026, 7:46 PMINSERT INTO or CTAS, but they are treated as external data sources because StarRocks does not control their entire lifecycle/optimization.
In short: StarRocks supports Iceberg for openness, but it uses its native format for speed and advanced database-level features. If it used Iceberg for its internal storage, it would have to sacrifice the performance and real-time update capabilities that define the engine.
References
• data_source/catalog/iceberg/iceberg_catalog.md
• deployment/shared_data/feature-support-shared-data.md
• deployment/shared_data/hdfs.mdRocky
07/03/2026, 7:46 PMINSERT INTO, but it treats them as external because it cannot guarantee the same performance optimizations (like the Primary Key index) that it can with its own format.
4. Can you use Iceberg instead?
If you prefer the openness of Iceberg over the performance of the native format, you can still achieve a "shared-data" experience:
1. Deploy a StarRocks cluster (shared-data or shared-nothing).
2. Create an Iceberg Catalog pointing to your S3 bucket.
3. Use INSERT INTO iceberg_catalog.db.table SELECT ... to store your data there.
Summary: The native format is for speed and advanced database features (like real-time updates), while the Iceberg catalog is for ecosystem compatibility. By offering both, StarRocks lets you choose the right tool for each specific workloads requiring either maximum performance or maximum openness.
References
• deployment/shared_data/feature-support-shared-data.md
• data_source/catalog/iceberg/iceberg_catalog.md
• deployment/shared_data/s3.md
References
• release_notes/release-3.3.md
• data_source/feature-support-data-lake-analytics.mdEliezer Talker
07/03/2026, 7:48 PMRocky
07/03/2026, 7:48 PMINSERT INTO iceberg_table), ensuring your data remains accessible to the rest of your ecosystem.
In summary: The native format isn't a standard because its job is to be the fastest possible storage for one specific engine, whereas Iceberg's job is to be the standard storage for every engine. By offering both, StarRocks lets you decide when you need absolute speed vs. absolute openness.
References
• introduction/what_is_starrocks.md
• best_practices/table_clustering.md
• integrations/data_lakes.mdx
• data_source/catalog/iceberg/iceberg_catalog.md
References
• loading/loading_introduction/feature-support-loading-and-unloading.md
• introduction/StarRocks_intro.md
• developers/How_to_Contribute.md
• introduction/what_is_starrocks.mdRocky
07/03/2026, 7:49 PMINSERT INTO) to Iceberg tables. This ensures your data isn't "locked in" and can be read by any other tool in your ecosystem.
Summary
The format isn't "closed"—it's just engine-optimized.
* Iceberg is a "bridge" between different tools.
* StarRocks Native is the "engine room" designed for maximum speed.
By being open source, StarRocks ensures you can see how it works; by supporting Iceberg, it ensures you can take your data wherever you want.
References
• introduction/what_is_starrocks.md
• data_source/catalog/iceberg/iceberg_catalog.md
• integrations/data_lakes.mdx
• deployment/shared_data/feature-support-shared-data.md
References
• data_source/catalog/iceberg/iceberg_catalog.md
• introduction/what_is_starrocks.md
• integrations/data_lakes.mdx
• deployment/shared_data/feature-support-shared-data.md
References
• integrations/data_lakes.mdx
• introduction/Features.md
• data_source/data_lakes.mdx
• faq/Others.md
• data_source/feature-support-data-lake-analytics.md
• data_source/catalog/iceberg/iceberg_catalog.mdEliezer Talker
07/04/2026, 9:46 AMRocky
07/04/2026, 9:46 AMrun_mode is set to shared_data at the cluster level. In this mode, the remote object storage (S3/HDFS) is the primary, persistent source of truth.
* All permanent tables you create are of type CLOUD_NATIVE.
* Every write operation must commit to the remote storage to ensure data durability and consistency across multiple Compute Nodes (CNs).
* You cannot mix shared_data and shared_nothing (local-disk-only) modes in the same cluster.
2. Achieving "Local" Performance via Data Cache
While you cannot prevent data from being written to S3, you can effectively "pin" tables to local disks using the Data Cache feature. This gives you the speed of local NVMe/SSDs while retaining the scalability of S3.
You can configure a table to stay in the local cache by using these properties:
sql
CREATE TABLE my_table (
...
)
PROPERTIES (
"datacache.enable" = "true",
-- Set a long duration or omit it to keep data in cache as "hot"
"datacache.partition_duration" = "1 YEAR"
);
* Write-through Cache: When you load data, it is written to S3 and the local disk cache simultaneously.
* Cache Warmup: You can use the CACHE SELECT command (StarRocks v3.3+) to proactively pull data from S3 into the local cache before running queries.
3. Temporary Tables (v3.3.1+)
If your "tables" are actually intermediate results or session-based scratchpads, StarRocks recently introduced Temporary Tables.
* These are session-scoped and automatically deleted when the session ends.
* However, even for temporary tables in a shared-data cluster, the default behavior is to use the cluster's default storage volume (S3).
Summary Comparison
Feature | Shared-Nothing (Local) | Shared-Data (S3)
Source of Truth | Local BE Disks | S3 / Object Storage
High Availability | Replicas (3x storage cost) | S3 Native (1x storage cost)
Performance | Constant local disk speed | Local disk speed if cache is hit
Scaling | Rebalancing data (Slow) | Instant (Stateless CN nodes)
If you have a strict requirement for a table to never touch S3 (e.g., for security or extreme cost-saving on S3 API calls), you would currently need to maintain a separate shared-nothing cluster for those specific workloads.
References
• deployment/shared_data/s3.md
• introduction/Architecture.md
• table_design/StarRocks_table_design.md
• deployment/shared_data/feature-support-shared-data.md
References
• introduction/Architecture.md
• quick_start/shared-data.md
• table_design/table_design.md
• deployment/shared_data/s3.mdEliezer Talker
07/04/2026, 9:49 AMRocky
07/04/2026, 9:50 AMSELECT * FROM alerts WHERE id = 123) or high-concurrency UPSERTs, you should use the Primary Key model with Row-Columnar storage (introduced in v3.2).
* Why: StarRocks is normally columnar, which is slow for retrieving a single full row. Row-columnar storage creates an additional row-based store that allows for sub-millisecond point lookups.
* Property:
sql
PROPERTIES (
"enable_persistent_index" = "true",
"persistent_index_type" = "LOCAL", -- Keep PK index on local NVMe
"column_context" = "{\"common_column_group\":\"pb\"}" -- Example row-store config
)
2. The "Dashboard" Tables: Data Cache "Pinning"
For dashboard analytics (aggregations), the performance bottleneck is usually S3 latency. You can bypass this by "pinning" these tables to the local NVMe cache of your compute nodes.
* Write-Through Cache: In StarRocks, when you load data into a shared-data table with datacache.enable = true (the default), the data is written to S3 and the local disk cache simultaneously. Your first query will already hit the local disk, not S3.
* Infinite TTL: Set the cache duration to a very long time so the data is never evicted based on time.
sql
PROPERTIES (
"datacache.enable" = "true",
"datacache.partition_duration" = "100 YEAR"
)
3. Proactive Warming (Sub-100ms Insurance)
If your ETL process finishes and you want to ensure the dashboard is fast for the very first user, use the Cache Warmup feature (v3.3+). After your ETL INSERT completes, run:
sql
CACHE SELECT * FROM dashboard_etl_table;
This proactively pulls any missing data from S3 into the local NVMe cache so that the dashboard query never touches the network.
Summary for your Use Case
Requirement | Solution
Durability | S3 (Automatic in shared-data mode)
Point Lookup (<10ms) | Primary Key Table + Row-Columnar Storage
Analytic Query (<100ms) | Data Cache (NVMe) + Cache Warmup (CACHE SELECT)
Consistency | The Persistent Index (set to LOCAL or CLOUD_NATIVE)
Result: You get the sub-100ms speed of local storage with the infinite scaling and lower cost of S3. In official benchmarks, a shared-data cluster with Data Cache enabled actually performs 1.2x faster than a traditional shared-nothing cluster due to more efficient I/O threading.
References
• deployment/shared_data/feature-support-shared-data.md
• table_design/table_types/primary_key_table.md
• using_starrocks/caching/block_cache.md
• data_source/data_cache.md
References
• deployment/shared_data/s3.md
• deployment/shared_data/hdfs.mdRocky
07/04/2026, 9:50 AMLOCAL to keep the primary key index on the local disk of your Compute Nodes (CNs). This avoids network calls to S3 for index lookups.
* Row-Columnar Storage (v3.2+): Enable row-columnar storage for these tables. This allows StarRocks to retrieve an entire row in a single I/O operation (sub-1ms), rather than scanning multiple columns.
sql
PROPERTIES (
"enable_persistent_index" = "true",
"persistent_index_type" = "LOCAL",
"column_context" = "{\"common_column_group\":\"pb\"}"
)
2. For Dashboards (Aggregation & ETL)
Dashboards usually involve SUM, COUNT, and GROUP BY operations.
* Synchronous Materialized Views (v3.4+): If your dashboards query specific aggregates, use a Synchronous MV. These are now supported in shared-data mode. They pre-calculate the results during data ingestion, reducing query time from seconds to milliseconds.
* Query Cache (v3.4+): Enable the Query Cache. It stores the final or intermediate result sets in the CN's memory. If the same dashboard is viewed by multiple users or refreshed frequently, the results are served instantly from memory.
sql
SET [GLOBAL] enable_query_cache = true;
3. Data Cache "Pinning" & Warmup
To ensure your ETL results never wait for S3 I/O:
* Data Cache: Ensure datacache.enable = true is set (default).
* Infinite TTL: Set datacache.partition_duration to a very long time (e.g., 100 YEAR) so your "hot" dashboard data is never evicted from local SSDs to make room for older data.
* Proactive Warmup: After your ETL job completes, run a CACHE SELECT query. This pulls the newly processed data from S3 into the local CN cache immediately, so the first dashboard user experiences sub-100ms speeds.
sql
CACHE SELECT * FROM your_dashboard_etl_table WHERE report_date = '2023-10-27';
4. Health Check: Compaction Score
High latency in shared-data mode often comes from insufficient compaction (too many small files on S3).
* Monitor the Compaction Score using SHOW PROC '/compactions'.
* If the score is consistently > 10, your queries will slow down as they have to merge many files. You can increase compact_threads in the BE/CN configuration to speed up this process.
Summary
Use Case | Core Optimization | Target Latency
Alert Point Lookups | PK Table + Row Store + Local Persistent Index | < 10ms
Dashboard Aggregates | Synchronous MV + Query Cache | < 50ms
First-load Performance | Data Cache Warmup (CACHE SELECT) | < 100ms
References
• table_design/table_types/primary_key_table.md
• using_starrocks/caching/query_cache.md
• deployment/shared_data/feature-support-shared-data.md
• using_starrocks/Materialized_view-single_table.md
• faq/shared_data_faq.md
References
• table_design/hybrid_table.mdRocky
07/04/2026, 9:50 AMRocky
07/04/2026, 9:50 AMcolumn_context to enable the row-store (internal optimized format).
* Persistent Index: In shared-data mode, keep the primary key index on local disks for maximum speed.
sql
PROPERTIES (
"enable_persistent_index" = "true",
"persistent_index_type" = "LOCAL", -- Keep the "address book" on local NVMe
"column_context" = "{\"common_column_group\":\"pb\"}" -- Enables row-oriented optimization
);
2. For "Dashboards": Data Cache Pinning
For dashboard ETL tables (aggregations like SUM, COUNT, GROUP BY), you need to ensure the data is "pinned" to the local NVMe cache of your compute nodes so the query never waits on S3.
* Write-Through Cache: In StarRocks, when you load data, it is written to S3 and the local disk cache simultaneously by default. Your first query will hit the local disk, not S3.
* Long TTL: Ensure your dashboard data stays "hot" by setting a long partition duration.
sql
PROPERTIES (
"datacache.enable" = "true",
"datacache.partition_duration" = "1 YEAR" -- Effectively pins data to local disks
);
3. Sub-100ms "Insurance": Cache Warmup
If your ETL process finishes and you want to guarantee that the very first user who opens the dashboard gets a sub-100ms response, use the Cache Warmup feature (introduced in v3.3).
After your ETL INSERT completes, run:
sql
CACHE SELECT * FROM dashboard_etl_table;
This proactively pulls any data not already in the local NVMe cache from S3. You can even schedule this as a routine task to run immediately after your ETL pipeline finishes.
Summary of the "Warm" Path
Requirement | Solution | Speed
Point Lookups (Alerts) | Primary Key + Row-Store | < 10ms
Dashboard Queries | Data Cache (NVMe) | < 100ms
Data Durability | S3 (Cloud-Native Storage) | (Background)
By combining the Data Cache (for the data itself) and the Persistent Index (for the primary keys), you get the sub-100ms performance of a local cluster while keeping the architectural benefits of shared-data (instant scaling, lower cost).
References
• deployment/shared_data/feature-support-shared-data.md
• table_design/table_types/primary_key_table.md
• data_source/block_cache_warmup.md
• introduction/what_is_starrocks.md
• best_practices/primarykey_table.md
References
• table_design/hybrid_table.md
• deployment/shared_data/feature-support-shared-data.mdRocky
07/04/2026, 9:50 AM"enable_persistent_index" = "true" and "persistent_index_type" = "LOCAL" (v3.1.4+).
* Limitation Note: The "Hybrid row-column" storage (which provides a row-store for sub-10ms lookups) is currently not supported in shared-data mode. To hit sub-100ms for alerts in shared-data mode, you must ensure your CN nodes have high-speed NVMe/SSD and sufficient Data Cache to keep the alert table's segment files local.
2. Dashboard ETL Tables (Analytical Speed)
Dashboards usually involve aggregations (GROUP BY, SUM). To make these sub-100ms, you must ensure the data never leaves the CN node's local storage.
* Pinning Data to Cache: Set a long duration for the cache to prevent S3 round-trips.
sql
PROPERTIES (
"datacache.enable" = "true",
"datacache.partition_duration" = "1 YEAR"
)
* Proactive Warming (v3.3+): Immediately after your ETL job (e.g., an INSERT INTO ... SELECT) finishes, trigger a Cache Warmup. This "pushes" the new data into the local NVMe cache so the very first dashboard user gets a sub-100ms response.
sql
-- Warm up the specific data needed for the dashboard
CACHE SELECT * FROM dashboard_table WHERE report_date = '2024-05-20';
3. Critical Infrastructure Setup
To guarantee these speeds in shared-data mode, your Compute Nodes (CN) must be configured as follows:
1. Local Storage: CN nodes must have fast local disks (SSD/NVMe). Configure storage_root_path in cn.conf to point to these disks.
2. Cache Size: Ensure starlet_star_cache_disk_size_percent (default 90%) allows enough room to hold your "hot" alert and dashboard data.
3. Unified Cache (v3.4+): If you are on version 3.4 or later, the data lake and internal table caches are unified, making management simpler and more efficient.
Summary Strategy
Use Case | Table Model | Key Optimization
Alerts | Primary Key | enable_persistent_index + LOCAL index type
Dashboards | Duplicate/PK | datacache.partition_duration + CACHE SELECT
ETL Flow | Any | Use CACHE SELECT immediately after Load/ETL
If your alerts require sub-10ms (single-digit) latency under extremely high concurrency, you might need to consider a Shared-nothing cluster for that specific table to utilize the Hybrid row-column storage (beta), as that optimization is currently exclusive to local storage clusters with local BE local storage.
References
• table_design/table_types/primary_key_table.md
• deployment/shared_data/feature-support-shared-data.md
• using_starrocks/caching/block_cache.md
• table_design/hybrid_table.md
• administration/management/monitoring/metrics-shared-data.mdEliezer Talker
07/04/2026, 9:58 AMcolumn_context to enable the row-store (internal optimized format).
* Persistent Index: In shared-data mode, keep the primary key index on local disks for maximum speed."
does this mean the table is not stored in a columnar way ?Rocky
07/04/2026, 9:59 AMSUM, AVG, GROUP BY).
2. Row-Store Format: A redundant copy used specifically for "Alerts" (e.g., SELECT * FROM alerts WHERE id = 123).
When you run a query, the StarRocks optimizer automatically chooses the row-store for point lookups and the columnar store for analytical scans. This is why it is called Hybrid storage.
3. How to hit <100ms for Alerts in Shared-Data Mode
Since you are in shared-data mode and cannot use the row-store, you should use these two features to achieve sub-100ms response times:
A. Persistent Index (Set to LOCAL)
For Primary Key tables in shared-data mode, the "index" that tracks where each row is located can be stored on the local NVMe disks of your Compute Nodes (CN) instead of S3. This eliminates the network overhead when looking up an alert ID.
* Property: "enable_persistent_index" = "true", "persistent_index_type" = "LOCAL"
B. Data Cache Warmup
For both your alerts and dashboard ETL tables, you must ensure the data is in the local NVMe cache of your CN nodes.
* Property: "datacache.enable" = "true"
* Action: Immediately after your ETL finishes, run CACHE SELECT * FROM your_table;. This "pins" the data to the local disk of the CN node.
Summary for your Use Case
In your shared-data cluster, your tables will be purely columnar. You will achieve the <100ms speed for alerts by:
1. Keeping the Primary Key index on the CN node's local SSD.
2. Ensuring the Columnar data blocks are "warmed up" into the CN node's local disk cache.
This combination allows the CN node to find the row location instantly (from the local index) and read the data immediately (from the local cache), hitting your sub-100ms target without needing the row-store feature.
References
• table_design/hybrid_table.md
• deployment/shared_data/feature-support-shared-data.md
• using_starrocks/caching/block_cache.md
• table_design/table_types/primary_key_table.mdEliezer Talker
07/04/2026, 10:01 AMRocky
07/04/2026, 10:01 AM__row. This column contains all the values for that row encoded into a single binary block.
* Actual Overhead: Because columnar data compresses much better (often 5x–10x) than the binary row-store data, the total storage increase is typically 1.5x to 2x the size of the original columnar-only table.
* Write Performance: Loading data also takes more CPU and time because the system has to encode and write the data in two different formats simultaneously.
2. Critical Check for your Version (4.1.1)
Although you are on v4.1.1, there is a limitation you must keep in mind:
* If you are in Shared-Data Mode (S3/Object Storage): The Hybrid Row-Column (row-store) feature is still not supported for shared-data tables in v4.1.1. You cannot set the column_context property on these tables yet.
* If you are in Shared-Nothing Mode: You can use it, and you will see the storage increase mentioned above.
3. Recommendation for Sub-100ms on v4.1.1 (Shared-Data)
Since you are likely using Shared-Data mode (the most common reason to ask about S3/Storage costs), you should achieve your sub-100ms target using these two "storage-efficient" methods instead of the row-store:
1. Persistent Index (Local):
Keep your Primary Key index on the local NVMe of your Compute Nodes (CN). This makes lookups instant without doubling your S3 storage.
sql
PROPERTIES (
"enable_persistent_index" = "true",
"persistent_index_type" = "LOCAL"
)
2. Unified Data Cache:
In v4.1.1, use the Data Cache to keep your "Alerts" and "Dashboard" data on the local disk of the CN. This gives you local-disk speed for queries (<100ms) while keeping your storage costs low on S3.
* Pro Tip: After your ETL finishes, run CACHE SELECT * FROM your_table to ensure the data is moved from S3 to the local NVMe cache immediately.
Summary: If you could use row-store, it would roughly double your storage. But since you are in shared-data mode, you don't need to pay that storage penalty; you can use the Local Persistent Index and Data Cache to hit <100ms for both alerts and dashboards.
References
• table_design/hybrid_table.md
• deployment/shared_data/feature-support-shared-data.md
• using_starrocks/caching/block_cache.md
• administration/management/monitoring/metrics-shared-data.md
References
• table_design/hybrid_table.md
• deployment/shared_data/feature-support-shared-data.md