- Posted on
- admin
- No Comments
What is Apache Doris? Complete Guide: Key Differences
What is Apache Doris? Put simply, it is an open source analytical database that answers SQL queries over very large datasets in well under a second, even while new data keeps streaming in. Companies run it behind customer-facing dashboards, log search, user behavior analytics and, more recently, AI retrieval workloads.Apache Doris documentation
If you have searched for Doris, you have probably also run into ClickHouse, StarRocks, Druid and Elasticsearch, and wondered why so many systems seem to do the same job. They overlap, but they make different trade-offs. This guide explains what Doris is, how it is built, what it does well, where it falls short, and how it differs from the tools people most often compare it with. It reflects the 4.1 release line and the 5.0 preview that the project announced in September 2026.
What is Apache Doris?
Apache Doris is an open source, massively parallel processing (MPP) database designed for real-time analytics. It stores data in columns, runs queries with a vectorized execution engine, and spreads the work across many machines. You connect to it over the MySQL protocol, so most MySQL clients, JDBC drivers and BI tools work without special adapters.
Doris is a top-level project of the Apache Software Foundation and ships under the Apache 2.0 license. The frontend is written in Java and the backend in C++.
The short version of what it is good at:
- Fast aggregations and filters over billions of rows
- High query concurrency, meaning thousands of users or API calls hitting the same tables
- Fresh data, with ingestion latency measured in seconds
- Standard SQL, including multi-table joins
That combination is the reason Doris sits between older batch warehouses, which are slow to load and slow to query interactively, and transactional databases, which cannot scan huge tables quickly.
A short history of Apache Doris
Doris began inside Baidu, where it was called Palo and was built to serve advertising reports. Baidu open sourced it in 2017 and donated it to the Apache Incubator in 2018, which is when it took the Doris name. It graduated to a top-level Apache project in June 2022. A company called SelectDB was founded around the project and sells a commercial cloud product built on it.
The release history is worth knowing because it explains the feature set you see today:
- 1.x: Vectorized execution and a faster engine for aggregation queries.
- 2.0 and 2.1: Inverted indexes for full-text search, a new cost-based optimizer called Nereids, a pipeline execution model, and the VARIANT type for semi-structured JSON data.
- 3.0: A compute-storage decoupled mode that keeps data in object storage and treats compute nodes as disposable.
- 4.0: Vector indexes (HNSW) and hybrid search for AI use cases, plus the first version of spill to disk.
- 4.1: IVF vector indexes, a
search()SQL function, full read and write support for Iceberg V2 and V3 tables,MERGE INTO, and a new segment storage format for very wide tables. The 4.1 line has had patch releases up to 4.1.5. - 5.0 preview: In September 2026 the project described 5.0 as a unified multimodal lakehouse for real-time analytics. Treat it as a preview until it reaches general availability.
How Apache Doris works: architecture explained
One reason teams adopt Doris is that its architecture is small. There are two process types, and that is all.
Frontend (FE) nodes
Frontend nodes hold metadata, accept client connections, parse and plan SQL, and manage the cluster. A cluster normally runs three or more FE nodes for high availability, with one leader, followers that replicate metadata, and optional observers that add read capacity.
Backend (BE) nodes
Backend nodes store data and execute query fragments. When a query arrives, the FE builds a distributed plan, sends fragments to the BEs that hold the relevant data, and merges the partial results. Adding BE nodes adds both storage and compute.
A Doris cluster does not need ZooKeeper, HDFS or an external metadata database to run. That matters when you are the person paged at 2 a.m.
How data is laid out
Tables are split into partitions, usually by time, and each partition is divided into buckets by hashing a column. Each bucket is a tablet, and each tablet has several replicas on different backends. Inside a tablet, data is stored in sorted columnar segments with sparse indexes, zone maps and optional bloom filters, so most queries skip the bulk of the data they would otherwise read.
The query path
A query goes through five stages:
- A client sends SQL to any FE over the MySQL protocol.
- The Nereids optimizer picks a join order and plan using table statistics.
- The plan is cut into fragments and shipped to the BEs holding the tablets.
- Each BE runs its fragment with the vectorized pipeline engine, processing batches of rows rather than one row at a time.
- Partial results are exchanged and merged, and the FE returns the final answer.
Doris 4.1 added several optimizations at this layer, including aggregation pushdown through joins, nested column pruning, a condition cache and an intermediate result cache that reuse work across repeated queries. The release notes report gains of 14% to 23% on SSB, TPC-H and TPC-DS at scale factor 1000 compared with 4.0. Those are the project’s own figures, so verify them against your workload.
Two deployment modes
Compute-storage coupled is the classic mode. Each BE stores its own data on local disks. It is simple and fast, but scaling compute means moving data.
Compute-storage decoupled keeps data in object storage such as S3 and uses local disks as a cache. You can add or remove compute nodes in minutes and run separate compute groups for different workloads over the same data. The Doris project says more than 2,000 enterprises now use this mode, and 4.1 improved its file cache, cold query performance and object storage request costs.
Data models in Doris
When you create a table you choose a data model, and the choice affects both performance and how updates behave.
| Model | What it does | Typical use |
|---|---|---|
| Duplicate Key | Stores every row as written, sorted by the key columns | Logs, events, detail data |
| Aggregate Key | Merges rows with the same key using functions such as SUM, MAX or REPLACE | Pre-aggregated metrics |
| Unique Key | Keeps the latest row for each primary key | Order tables, user profiles, CDC mirrors |
The Unique Key model has two implementations. Merge-on-read resolves duplicates at query time. Merge-on-write resolves them during ingestion, which makes reads faster and is the setting most teams choose for real-time upserts.
Beyond the model, Doris offers several tools to speed up reads:
- Synchronous and asynchronous materialized views
- Inverted indexes for text and equality filters
- Bloom filter and n-gram indexes
- ANN indexes for vector search
- Auto partitioning, which creates partitions as data arrives
Key features of Apache Doris
Real-time ingestion
Doris can load data through several routes. Stream Load pushes files or batches over HTTP. Routine Load pulls continuously from Kafka. Broker Load and S3 load handle large batch files. Flink and Spark connectors exist for pipeline jobs. Version 4.1 also added continuous load jobs that watch an S3 path and real-time sync from MySQL and PostgreSQL, so a team can mirror an operational database into Doris without writing a separate CDC pipeline.
Every load is atomic. A batch either becomes visible in full or not at all.
Fast queries on semi-structured data
The VARIANT type lets you store JSON without defining a schema up front. Doris extracts frequently used paths into their own columns, which is why queries on those paths run at columnar speed. In 4.1, a new storage format (Segment V3) and options for sparse and document modes target tables with thousands of columns, which is common in vehicle telemetry and event tracking.
Search and AI workloads
Doris has had inverted indexes for full-text search since the 2.x line. Version 4.1 added a search() function whose syntax is compatible with Elasticsearch query_string, with BM25 relevance scoring. Because it returns a boolean predicate, you can combine it with joins and aggregations in the same SQL statement.
On the vector side, 4.0 introduced HNSW indexes and 4.1 added IVF, on-disk IVF and several quantization methods that reduce memory use by 4 to 8 times at some cost in recall. According to the 4.1 release notes, a 16-core machine with 64 GB of memory served about 900 queries per second at 97% recall on one million vectors. Again, that is a vendor benchmark, but it shows the intended direction: one system for structured filters, keyword search and vector similarity.
Lakehouse queries
Doris can read Hive, Iceberg, Hudi, Paimon and other sources through catalogs, so you can query data in a lake without copying it. In 4.1 it can also write to Iceberg V2 and V3 tables, with INSERT, UPDATE, DELETE and MERGE INTO, which means a team can maintain Iceberg tables without Spark for some workloads.
Spill to disk
Queries that need more memory than a node has used to fail with out-of-memory errors. Since 4.0, and much improved in 4.1, hash joins, aggregations and sorts can spill intermediate data to disk. The project reports running every TPC-DS 10 TB query on a single backend with 8 GB of memory. That is an extreme test, and it will run slowly, but it shows the engine degrades instead of crashing.
Workload management
Workload groups let you set CPU and memory limits for different teams or query types, so a heavy ad hoc query does not starve the dashboard that your customers see. In decoupled mode you can go further and give each workload its own compute group.
Common use cases for Apache Doris
The examples below come from the Doris project’s own blog and user stories, so they naturally lean positive. They still show the range of what people build.
Customer-facing analytics. Product teams embed Doris behind in-app reports where thousands of users query at once. High concurrency is what separates this from a classic warehouse. Doris was built for it from the start, which is why Baidu used it for ad reporting.
Real-time dashboards and operational reporting. Retail, logistics and fintech teams load order or event streams and query them seconds later. Meituan described consolidating its analytics stack on Doris.
Log and observability analytics. Inverted indexes and cheap storage make Doris a candidate to replace Elasticsearch for logs. Tencent Music reported cutting costs by 80% after moving from Elasticsearch, and NetEase wrote about using Doris for log and time series data instead of Elasticsearch and InfluxDB.
User behavior and A/B testing. Funnels, retention and experiment analysis rely on large joins and bitmap or HLL aggregations, which Doris supports natively.
Lakehouse acceleration. Xiaomi reported a unified platform on Doris and Paimon with about 6 times faster performance, according to the project blog.
Migration from other OLAP systems. One telecom operator described moving 13 PB in a single table from ClickHouse to Doris.
AI data stores. ByteDance described solving billion-scale vector search with Doris 4.0. The 4.1 notes list RAG chunks, conversation context and agent traces as target data.
Key differences: Apache Doris vs other databases
This is the section most readers come for. The table gives the short version, and the subsections explain the reasoning.
| System | Core design | Joins and SQL | Real-time updates | Operations | Best fit |
|---|---|---|---|---|---|
| Apache Doris | MPP columnar OLAP with FE and BE nodes | Full SQL, strong multi-table joins | Yes, via Unique Key merge-on-write | Two process types, no external dependencies | Real-time analytics, high concurrency, mixed workloads |
| ClickHouse | Columnar OLAP with many table engines | Strong on single wide tables, joins improving | Eventual, via ReplacingMergeTree or mutations | Replication needs Keeper or ZooKeeper | Fast scans over denormalized data, logs |
| StarRocks | MPP columnar OLAP, originally forked from Doris | Full SQL, strong joins | Yes, via primary key tables | Similar FE and BE layout | Similar to Doris, check feature fit |
| Apache Druid | Time series store with rollup at ingest | Limited joins | Limited | Several service types | Time-sliced event analytics |
| Elasticsearch | Distributed search engine on Lucene | Limited joins and SQL | Yes, but heavy on resources | JVM tuning, shard management | Full-text search, relevance ranking |
| Trino | Federated query engine, no storage | Full SQL | Depends on the source | Stateless workers | Querying many sources in place |
| Snowflake or BigQuery | Managed cloud warehouses | Full SQL | Yes | Fully managed | Elastic batch and BI analytics |
| PostgreSQL or MySQL | Row-based transactional databases | Full SQL | Yes, row level | Familiar | OLTP, small analytics |
Apache Doris vs ClickHouse
This is the comparison that comes up most. Both are fast columnar databases, and both can scan billions of rows quickly. The differences are mostly about workload shape and day-to-day operations.
SQL and joins. Doris uses the MySQL protocol and a cost-based optimizer designed for multi-table queries. ClickHouse has its own SQL dialect and native protocol, and it works best when data is denormalized into wide tables. Its join support has improved, but teams that model data as star or snowflake schemas often find Doris more comfortable.
Updates and deletes. Doris Unique Key tables with merge-on-write give you the latest row per key as soon as a load finishes. ClickHouse usually relies on ReplacingMergeTree, where duplicates are cleaned up in the background, or on mutations, which are heavier operations. The Doris team published a benchmark claiming up to 34 times faster real-time updates than ClickHouse. Treat that as a claim from one side, but the architectural difference is real.
Operations. A Doris cluster is FE and BE nodes, with automatic tablet balancing and replica repair. A replicated ClickHouse setup depends on ClickHouse Keeper or ZooKeeper and more manual shard planning.
Raw speed. On the ClickBench single-table benchmark, the 4.1 release notes say Doris ranked first for cold queries and storage size and second overall, just behind ClickHouse. If your workload is a handful of giant flat tables with simple filters, ClickHouse remains excellent. If your queries join several tables or you need upserts, Doris deserves a serious test.
Apache Doris vs StarRocks
StarRocks started around 2020 as a fork of Doris, and the two still look alike. Both use FE and BE nodes, the MySQL protocol, vectorized execution and a cost-based optimizer. Since the split they have gone in different directions. Doris is governed by the Apache Software Foundation, while StarRocks is hosted by the Linux Foundation. Doris has invested heavily in inverted indexes, VARIANT, hybrid search and its decoupled architecture.
Because both projects move quickly, any feature checklist I wrote here would age fast. Pick the three or four features your project depends on, check the current docs of both, and run your own queries on both. That is a better basis for a decision than any published comparison.
Apache Doris vs Apache Druid
Druid was designed for time-sliced event data. It can roll up rows at ingestion time, which keeps storage small, but it commits you to the dimensions you chose up front. It also splits work across several service types (coordinator, overlord, broker, historical and middle manager processes), which adds operational weight.
Doris stores detail data, supports joins and updates, and runs as one cluster type with two roles. Teams often move from Druid to Doris when analysts want to ask questions that the rollup did not anticipate. Druid is still a sensible choice for very high-rate time series with fixed query shapes.
Apache Doris vs Elasticsearch
Elasticsearch is a search engine first. Its strength is relevance-ranked full-text search, a large plugin and tooling ecosystem and mature log tooling around Kibana. It is weaker at large aggregations and joins, and it can use a lot of memory and disk for log volumes.
Doris approaches the problem from the other side: an analytical database that has added search. With inverted indexes and the 4.1 search() function, many Elasticsearch query patterns translate with small changes, and you can aggregate and join in the same statement. For log analytics and observability the cost savings can be large. For applications that depend on fine-tuned relevance, synonyms and the full Elasticsearch plugin ecosystem, Elasticsearch is still the safer pick.
Apache Doris vs Trino and Presto
Trino is a query engine with no storage of its own. It excels at federating queries across many systems: a Hive table, a PostgreSQL table and an S3 data set in one statement. Latency is usually seconds to minutes, and concurrency is modest.
Doris stores data itself and is tuned for sub-second queries under heavy concurrency. It can also federate, through catalogs, and cache lake data locally. A common pattern is Trino for exploratory work across many sources and Doris for the data you serve repeatedly.
Apache Doris vs Snowflake and BigQuery
Snowflake and BigQuery are managed services. You do not run anything, and you pay for what you use. They scale elastically and suit batch ETL, BI and data sharing very well.
Doris is open source, which gives you control over cost and deployment, including your own cloud account or an on-premises cluster. It also targets lower latency and higher concurrency than warehouse services are typically priced for. The trade-off is that you or a vendor must operate it. If you want the managed experience, SelectDB’s cloud service and other vendor offerings exist for that reason.
Apache Doris vs PostgreSQL and MySQL
These are row-oriented transactional databases. They handle many small reads and writes with strict transactional guarantees. Doris is not a replacement. The usual design keeps the transactional database as the source of truth and syncs changes into Doris for analytics, and 4.1’s MySQL and PostgreSQL continuous sync was built for exactly that.
When Apache Doris is not the right choice
Doris is not the answer to every data problem. Skip it, or use it alongside something else, in these cases:
- You need row-level OLTP transactions, such as a payment ledger or an order checkout flow.
- Your data fits comfortably on one PostgreSQL server and queries are already fast.
- Your workload is mostly overnight batch jobs where nobody waits for results, and a managed warehouse is cheaper to run.
- You need a full relevance-tuned search product with a large plugin ecosystem.
- Your team has no capacity to run a distributed database and no vendor to run it for you.
New features also take time to settle. If you adopt a freshly released capability, such as 4.1’s vector search or Iceberg V3 writes, test it against your data volume before you promise it to anyone.
Getting started with Apache Doris
There are four common ways to try it:
- Docker: The project provides a quick start image that runs one FE and one BE on a laptop.
- Bare metal or virtual machines: Download a release from the official site, then start FE and BE processes and register the backend.
- Kubernetes: Use the Doris operator for managed deployments in a cluster.
- Managed cloud: SelectDB Cloud runs Doris for you.
Once connected with any MySQL client, a first real table looks like this:
CREATE TABLE orders (
order_id BIGINT,
user_id BIGINT,
status VARCHAR(20),
amount DECIMAL(12,2),
updated_at DATETIME
)
UNIQUE KEY(order_id)
DISTRIBUTED BY HASH(order_id) BUCKETS 8
PROPERTIES (
"replication_num" = "3",
"enable_unique_key_merge_on_write" = "true"
);
This creates a table where each order_id keeps only its latest row. Load a few thousand rows through Stream Load or INSERT, then try an aggregation:
SELECT status, COUNT(*) AS orders, SUM(amount) AS revenue
FROM orders
WHERE updated_at >= NOW() - INTERVAL 1 DAY
GROUP BY status
ORDER BY revenue DESC;
On a small laptop cluster this will return instantly, which proves little. The real test is loading a few hundred million rows of your own data and running your actual dashboard queries with realistic concurrency.
Skills to learn for Apache Doris
If you plan to work with Doris, or interview for roles that list it, these are the areas to practice:
- Dimensional modeling and choosing the right data model and key columns
- Partitioning and bucketing so queries prune data and tablets stay balanced
- Loading methods, especially Kafka with Routine Load and Flink pipelines
- Reading query profiles to find slow joins and skewed data
- Materialized views and indexes, including when each helps
- Capacity planning, replica settings and decoupled storage
- Lakehouse catalogs for Iceberg, Hive and Paimon
CourseDrill’s data engineering courses cover these topics with hands-on labs. [Link to the CourseDrill Apache Doris course]
Frequently asked questions
Is Apache Doris free?
Yes. It is released under the Apache 2.0 license, so you can use, modify and deploy it commercially at no license cost. You still pay for the hardware or cloud resources that run it, and for support if you buy a commercial offering. Apache Doris on github
Is Apache Doris a database or a data warehouse?
It is an analytical (OLAP) database that is often used as the engine of a data warehouse or lakehouse. It is not a transactional database.
Is Apache Doris the same as MySQL?
No. Doris speaks the MySQL wire protocol and understands most MySQL syntax, which makes client tools work, but the storage engine, execution engine and architecture are completely different.
What language is Apache Doris written in?
The frontend is written in Java and the backend in C++.
Does Apache Doris support transactions?
It supports atomic data loads and transactional guarantees for load jobs, plus multi-statement transactions for some operations. It is not built for high-rate row-level OLTP transactions.
Can Apache Doris replace Elasticsearch?
For log analytics and observability, many teams have done it and reported lower cost. For search applications that rely on custom relevance tuning and Elasticsearch plugins, it is less likely to be a drop-in replacement. The 4.1 search() function with Elasticsearch-compatible syntax lowers the migration effort for common queries.
Which Apache Doris version should I use?
Check the official download page before you start. At the time of writing the newest stable line is 4.1, and the 4.0, 3.1 and 3.0 lines also receive patch releases. New projects usually start on the newest stable line, while teams that favor a conservative path often stay on a line that has had several patches.
Is Apache Doris better than StarRocks or ClickHouse?
Neither is better in every case. Doris tends to fit teams that want standard SQL with joins, real-time upserts, search and a simple cluster. ClickHouse is hard to beat on flat-table scans. StarRocks is close to Doris in design. Test the one or two queries that matter most to you on each.
Summary
Apache Doris is a real-time analytical database with a two-process architecture, a MySQL-compatible interface and a feature set that now stretches from classic dashboards to log search, lakehouse queries and vector retrieval. Its main differences from the systems it is compared with come down to a few points: it handles joins and upserts better than flat-table engines, it asks for less operational work than Druid or Elasticsearch clusters, and it stores and serves data itself where Trino does not. ff
If you are evaluating it, start with one workload that hurts today, such as a slow dashboard or an expensive Elasticsearch cluster. Load real data, measure latency at your expected concurrency, and compare against what you run now. The result of that single test will tell you more than any feature list, including this one.
Popular Courses
