ХабрПостыНовостиМегапосты?

Comparison: StarRocks vs Apache Druid

Apache Druid has been a staple for real-time analytics. However, with evolving and sophisticated analytics demands, it has faced challenges in satisfying modern data performance needs. Enter StarRocks, a high-performance, open-source analytical database, designed to adeptly meet the advanced analytics needs of contemporary enterprises by offering robust capabilities and performance.

In this article, we’ll explore the functionalities, strengths, and challenges of both Apache Druid and StarRocks. Using practical examples and benchmark results, we aim to guide you in identifying which database might best meet your data needs.

What is Apache Druid?

Apache Druid, established in 2011, is a high-performance, real-time analytics database known for its low-latency data ingestion, alongside providing a flexible environment for data exploration and analysis. It shines in its ability to deliver high-performance aggregation and demonstrates ease in horizontal scaling. Notably, Druid is adept at processing data at significant scales and furnishes potent pre-aggregation capabilities, facilitating not only the storage but also the expedient querying of data, catering to real-time data insight requirements.

What is StarRocks?

Established in 2020, StarRocks was initiated by a group of Apache Doris team members who branched out to create a new project, steering it in a distinctive direction. While its inception was grounded in Doris, a sweeping 90% of the StarRocks codebase has been innovatively redeveloped.

Despite being a relatively new player in the field, StarRocks has quickly gained traction and has been adopted by hundreds of leading organizations, including notable names like Airbnb, Expedia, Fanatics, Celonis, Lenovo, and Tencent.

The platform shines in various facets, such as its exceptional query performance highlighted by ClickBench, comprehensive support for all types of JOIN operations that obviate the need for denormalization, compatibility with the MySQL protocol, and connectivity to prominent open table formats like Apache Iceberg, Apache Hudi, Apache Hive, and Delta Lake, along with the ability to utilize local disk storage.

Apache Druid vs. StarRocks: Exploring the Differences

Apache Druid is a popular open-source distributed analytical database that is well-suited for real-time analytics and ad-hoc queries on large datasets. However, there are a few negatives with Apache Druid, including:

StarRocks address these issues by:

Apache Druid vs. StarRocks: Benchmark Comparison

We performed a test on 99 queries against a the SSB 100GB dataset. We used StarRocks and Apache Druid to query the same copy of data.

SSB 100 GB single-table test
SSB 100 GB single-table test

The test results show that StarRocks has better performance in the SSB 100 GB single-table test. Among the 11 queries, StarRocks outperforms Apache Druid by a large margin in 9 queries.

Apache Druid uses lookup and join to implement multi-table association. Apache Druid®join supports only broadcast hash joins and tables except the leftmost table must be able to be stored in memory. It has some limitations but lacks optimizations. This test uses Apache Druid lookups that have relatively good performance for the multi-table association. In actual implementation, lookup functions outperform lookup table joins. Therefore, this test uses lookup functions for the multi-table association.

performance in multi-table association
performance in multi-table association

The test results show that StarRocks has better performance in multi-table association. Apache Druid® lookup pre-loads table data to the memory of each node. It has advantages in scenarios where dimension tables contain only a moderate volume of data and frequent shuffling operations are not required. However, Apache Druid® lookup can only be used for simple key-value mapping.

 

Apache Druid vs. StarRocks – Which to choose?

When is StarRocks a fit?

When is Apache Druid a fit?

Use cases: Apache Druid vs. StarRocks

Resources

Benchmark: Apache Druid® vs. StarRocks: A Deep Dive and StarRocks' Queries Outperform ClickHouse, Apache Druid®, and Trino

Comparison: Apache Druid® vs. StarRocks: A Deep Dive

@PhoenixLi
30.10.2025 08:18 UTC
Первоисточник