Eliezer Talker
06/10/2026, 8:50 PMRocky
06/10/2026, 8:50 PMEliezer Talker
06/10/2026, 8:54 PMRocky
06/10/2026, 8:54 PMEliezer Talker
06/10/2026, 9:00 PMRocky
06/10/2026, 9:00 PMSET prefer_compute_node = true;, the FE will prioritize the CN nodes for these external catalog queries. This is the recommended setup because it leaves the BE nodes' CPU/IO free to handle your high-concurrency "hot data" queries.
* Mixed Queries (JOINs): If you join your hot native table with cold Iceberg data, the FE creates a distributed execution plan. It will scan the native data on the BEs and the Iceberg data on the CNs, then shuffle the intermediate results over the network to perform the join.
2. Performance: Sub-second queries on 200M+ rows
Native StarRocks Tables
* Performance: Excellent. Sub-second latency for 200 million rows is StarRocks' "bread and butter."
* Why: It uses a highly optimized columnar format, "Short Key" indexes (for fast range scans on time), and data pruning (partition/bucket pruning). With multiple ORDER BY clauses, StarRocks' vectorized execution engine processes blocks of data in parallel, making complex sorting very fast.
* Tip: Use the Duplicate Key or Primary Key table model and set your most frequent ORDER BY columns as the first columns in the table definition (the "Sort Key").
S3 Iceberg Tables
* Performance: Good (with Caching), Slower (without).
* Without Cache: Achieving sub-second latency for a 200M row scan directly from S3 is extremely difficult due to S3's latency and network bandwidth limits.
* With Data Cache: If you enable the StarRocks Data Cache (which uses local NVMe/SSD on your CN/BE nodes), performance becomes comparable to native tables. Once the "cold" data is queried once and cached locally, subsequent queries for that time range will be sub-second.
* Metadata: StarRocks also caches Iceberg manifest files, which speeds up the "planning" phase of the query significantly.
Summary Recommendation
Requirement | Native Table (BE) | Iceberg on S3 (CN)
Sub-second 200M rows | Yes (Native) | Yes (If Data Cache is enabled)
Complex Order By | Fast (via Sort Keys) | Moderate (Vectorized compute)
Time Filtering | Excellent (Partitioning) | Good (Partitioning)
For your use case:
Use BE nodes for the last 7 days of data to ensure the most consistent, sub-second performance. Use CN nodes with Data Cache enabled for the older Iceberg data. This gives you an "Elastic Data Warehouse" where hot data is always fast, and cold data is cost-effective but still high-performance when needed.
References
• data_source/catalog/iceberg/iceberg_catalog.md
• administration/management/Data_cache.md
• table_design/table_types/duplicate_key_table.md
• sql-reference/System_variable.md
References
• sql-reference/System_variable.md
• table_design/table_design.mdRocky
06/10/2026, 9:00 PMRocky
06/10/2026, 9:00 PMSET prefer_compute_node = true;
* Separation of Work: This is the ideal architecture. It ensures that heavy S3 scans on cold data don't consume the CPU/IO of your BE nodes, which are busy serving your sub-second hot data queries.
* Hybrid Queries (Joins): If you join a native table with an Iceberg table, the FE will generate a distributed plan: the BEs scan the native data, the CNs scan the Iceberg data, and they shuffle the intermediate results to complete the join.
2. Can you achieve sub-second queries on 200M+ rows?
Native StarRocks Tables: YES
StarRocks is designed specifically for this. For 200 million rows, sub-second latency is standard if the table is designed correctly.
* Order By Optimization: To speed up queries with multiple ORDER BY clauses, you should define a Sort Key (the first few columns in your CREATE TABLE statement). StarRocks stores data in this sorted order on disk, making range scans and sorting extremely efficient.
* Indexing: It uses columnar storage and zone-map indexes (min/max values per block) to skip irrelevant data instantly.
S3 Iceberg Tables: YES (with conditions)
Querying S3 directly for 200M rows in under a second is difficult due to the "S3 Tax" (network latency and manifest file overhead). However, you can achieve it by enabling two features:
1. Data Cache: This is critical. By enabling block_cache_enable = true on your CN nodes, StarRocks will store "hot" parts of your Iceberg files on local NVMe/SSD. Once the cache is warmed up, the query speed for Iceberg data becomes nearly identical to native tables.
2. Metadata Cache: StarRocks caches Iceberg manifest files in the FE memory. This removes the overhead of having to talk to the Nessie catalog and S3 just to find out which files to read.
Summary Table
Capability | Native Tables (BE) | Iceberg on S3 (CN)
200M rows < 1s | Native (Optimized for this) | Yes, but requires Data Cache
Scheduling | Fixed to BEs (Data Locality) | Flexible (Prefer CN via config)
Sort Performance | Excellent (via Sort Keys) | Good (Vectorized engine)
Best For | High-concurrency, fixed-latency | Cost-effective, elastic scaling
Recommendation: For your "multiple order by" requirements, put the most frequent sorting columns at the beginning of your Native table's schema. For Iceberg, ensure your CN nodes have fast local SSDs for the Data Cache to bridge the performance gap with S3.
References
• introduction/Architecture.md
• sql-reference/System_variable.md
• data_source/data_cache.md
• data_source/catalog/iceberg/iceberg_catalog.md
References
• data_source/catalog/iceberg/iceberg_catalog.md
• data_source/data_cache.mdRocky
06/10/2026, 9:00 PMEliezer Talker
06/10/2026, 9:05 PMRocky
06/10/2026, 9:06 PMORDER BY clauses and aggregations, 48 cores can easily crunch 200 million rows in well under 500ms.
How to Guarantee Sub-Second Performance
Even with the right number of nodes, your Table Design is what will truly lock in that sub-second speed:
* Sort Keys: Since you mentioned "multiple order bys," this is critical. Put the columns you most frequently use in ORDER BY or WHERE clauses at the top of your table definition. StarRocks will store the data physically sorted by these columns, allowing it to skip massive amounts of data.
* Partitioning: Partition your data by Time (e.g., PARTITION BY dt). If you query "the last 24 hours," StarRocks will only scan the 24-hour partition and ignore the rest of the 200 million rows entirely.
* Bucketing: Use a high-cardinality column (like user_id or order_id) for your DISTRIBUTED BY HASH key. This ensures the 200 million rows are spread evenly across your 3 BE nodes.
Summary of Sizing
Metric | Requirement
Data Volume | 200 Million Rows
Minimum BEs | 3 (for HA and Performance)
vCPU per BE | 16 Cores
RAM per BE | 64 GB
Expected Latency | 100ms - 500ms (for typical analytics)
If your query volume (QPS) is very high (hundreds of users querying at the exact same time), you might eventually scale to more nodes, but for a standard workload, 3 BEs is the "sweet spot" for 200 million rows.
References
• deployment/plan_cluster.md
• table_design/table_types/duplicate_key_table.md
• introduction/Architecture.md
• administration/management/Scale_up_down.md
References
• faq/Deploy_faq.md
• deployment/plan_cluster.md
• administration/management/BE_configuration.md
• faq/Others.mdRocky
06/10/2026, 9:06 PMORDER BY and complex analytics:
* CPU: 16 Cores (vCPU).
* RAM: 64 GB.
* Disk: SSD or NVMe (Essential for the "Data Cache" for your Iceberg queries and fast local scans).
──────────
Critical Design Tips for Your "Sub-Second" Goal
Even with enough nodes, your Table Design is what guarantees the performance:
1. The Sort Key (ORDER BY Clause):
Since you mentioned fetching data by time with multiple ORDER BY requirements, you must define the ORDER BY columns in your CREATE TABLE statement.
* Tip: Put the most frequently filtered column (e.g., event_time) first in the ORDER BY list. This creates a "short-key index" that allows StarRocks to skip massive amounts of data instantly.
2. Bucketing (Distribution):
Set your bucket count so that each "tablet" is roughly 100MB to 1GB in size. For 200M rows, this might mean 16 to 32 buckets. This ensures that when you run a query, all 3 BE nodes (and all their CPU cores) work on the data in parallel.
3. Partitioning:
Partition your native table by day. When you query "the last 24 hours," StarRocks will only touch the specific partition for that day, ignoring the other 6 days of hot data entirely.
Summary
You do not need a massive cluster for 200 million rows. 3 BE nodes (16c/64G each) is the "sweet spot"—it gives you the high availability you need for production and more than enough horsepower to hit sub-second latencies on a 200M row dataset.
References
• deployment/plan_cluster.md
• table_design/table_design.md
• benchmarking/SSB_Benchmarking.md
• administration/management/Data_cache.mdEliezer Talker
06/10/2026, 9:11 PMRocky
06/10/2026, 9:11 PM