Databases 7 min read

How StarRocks 1.19 Boosts Join Performance and Adds Primary Key Support

StarRocks 1.19 introduces a Global Runtime Filter that speeds up joins up to six‑fold, adds BE‑level disk balancing, launches an experimental Primary Key table type with near‑duplicate‑key read performance, enables external‑table writes between clusters, and includes a host of CPU‑cache and query‑optimizations.

StarRocks
StarRocks
StarRocks
How StarRocks 1.19 Boosts Join Performance and Adds Primary Key Support

StarRocks 1.19 introduces several performance‑enhancing features for its analytical database engine.

Global Runtime Filter

In relational joins, the Global Runtime Filter dynamically filters out rows that will not match the join, reducing data transfer and computation. The planner automatically decides whether to build the filter based on the size of the right‑hand table, requiring no user configuration.

Using TPCH 100 GB Query 17 (lineitem ≈ 600 M rows, orders ≈ 150 M rows) with parallelism 8, the query runtime improved by roughly six times when the filter was enabled.

select sum(l_extendedprice) / 7.0 as avg_yearly
from lineitem, part
where p_partkey = l_partkey
  and p_brand = 'Brand#23'
  and p_container = 'MED BOX'
  and l_quantity < (select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey);

BE Disk Balancing

When clusters grow and new disks are added, StarRocks 1.19 improves the disk‑balancing algorithm. It first balances data across all BE nodes, then balances tablet distribution and disk usage within each BE, ensuring better utilization of newly added storage.

Balance disks across all BE nodes.

After global balance, balance disks inside each BE, equalizing both disk usage percentages and tablet placement.

Experimental Primary Key Table

The new Primary Key table type replaces the previous Merge‑On‑Read approach, eliminating costly online merges during reads. It uses an in‑memory index, delivering read performance comparable to Duplicate Key and 3‑15× faster than Unique Key, depending on version count.

In TPCH tests, queries on Primary Key tables were only about 10 % slower than those without the feature. The feature currently supports Stream Load, Broker Load, Routine Load, and can be combined with the Flink‑CDC connector for near‑real‑time MySQL replication.

External Table Write

StarRocks now allows writing to another StarRocks cluster via external tables, facilitating read‑write separation and resource isolation. The process involves three steps:

Create the target table on the destination cluster.

Create an external table on the source cluster with a schema matching the target.

Specify the target cluster and source table in the external table properties (currently only StarRocks‑to‑StarRocks is supported).

Reference documentation: https://docs.starrocks.com/zh-cn/main/using_starrocks/External_table#starrocks外部表

Other Optimizations

Improved CPU cache usage, accelerating count(distinct int) and group by int queries.

Algorithmic enhancements that speed up OR predicates.

Export now supports column‑level export.

Enhanced show processlist to display specific SQL statements. SET_VAR now accepts multiple variable assignments.

StarRocks‑DataX Writer supports configurable interval flush.

Full release notes for v1.19.0: https://docs.starrocks.com/zh-cn/main/release_notes/release-1.19

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

performanceoptimizationdatabaseExternal TableStarRocksprimary key
StarRocks
Written by

StarRocks

StarRocks is an open‑source project under the Linux Foundation, focused on building a high‑performance, scalable analytical database that enables enterprises to create an efficient, unified lake‑house paradigm. It is widely used across many industries worldwide, helping numerous companies enhance their data analytics capabilities.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.