Comparison

ClickHouse vs Elasticsearch for logs and analytics: which one to run

Two engines that both get asked to hold logs and answer questions about them. What each one is built for, where each gets awkward, how their bills are metered and what running either of them involves. Checked 4 Dec 2026.

45 minutes with an engineer: we review your workload and sketch the design.

  • OSStend is our service
  • Checked 4 Dec 2026
  • No benchmarks quoted
clickhouse-vs-elasticsearch

ClickHouse is a column-oriented SQL database built for analytics over large tables, and Elasticsearch is a Lucene-based search engine built for text search and relevance. For logs and metrics at volume with aggregation-heavy questions, ClickHouse is usually the closer fit; for free-text search, relevance ranking and the Elastic solutions built on it, Elasticsearch is. Many estates run both. Checked 4 Dec 2026.

Customers

  • Microsoft logo
  • Henry Schein logo
  • Enbridge logo
  • Gojek logo

Partners

  • Broadcom logo
  • Redis logo
  • VMware Tanzu logo
  • OSSeva logo
160+Enterprise customers
10+Years running these systems
24/7Engineers on call
3Places it runs: our cloud, yours, your data center
Engines we run, on the platforms you already use
  • PostgreSQL
  • MySQL
  • MongoDB
  • Redis
  • Valkey
  • OpenSearch
  • Kafka
  • RabbitMQ
  • AWS
  • Google Cloud
  • Azure
  • Kubernetes
  • OpenShift
  • Prometheus
  • Grafana
  • Datadog
  • Dynatrace
  • Splunk

Should I use ClickHouse or Elasticsearch?

Choose ClickHouse when the main job is SQL aggregation over large, append-heavy tables, such as product analytics, metrics and log statistics. Choose Elasticsearch when the main job is searching text, ranking results by relevance or running Elastic's search, observability and security products. If you need both, run both.

If your main job is...Start withWhy
Dashboards and aggregations over billions of rowsClickHouseClickHouse describes itself as a column-oriented SQL database for analytics (ClickHouse docs, checked 4 Dec 2026)
Searching text and ranking resultsElasticsearchBuilt on Lucene's inverted index and listed with lexical (BM25) and semantic search (Elastic pricing, checked 4 Dec 2026)
Application search with typo tolerance and facetsElasticsearchSearch relevance is its core use. Check whether ClickHouse's text index covers your ranking needs.
Log storage cost and long retentionTest bothBoth have storage-saving modes; results depend on your data. We quote no benchmark.
Security analytics inside Elastic's SIEMElasticsearchElastic's Security solution is built on it.
Frequent row-level updatesNeitherBoth are awkward for it; see the write section. A transactional database such as PostgreSQL is the usual home.

How we compared: each vendor's own docs and pricing pages, read on 4 Dec 2026, linked beside each fact. We ran no benchmarks and quote none. OSStend is our service and runs both engines, so read the verdicts as one vendor's view.

How do ClickHouse and Elasticsearch store and query data differently?

ClickHouse stores each column separately and is queried with SQL, which suits scanning a few columns across many rows. Elasticsearch stores JSON documents in Lucene indices with an inverted index, which suits finding documents by their words. The model decides which questions are cheap.

What it isColumn-oriented SQL DBMS for OLAP (docs)Distributed search and analytics engine on Lucene
Query languageSQL: GROUP BY, JOIN, window functions, subqueriesQuery DSL, plus ES|QL on Elastic's tiers
Data unitRows in tables, ordered by a primary keyJSON documents in indices split into shards
Text searchText (inverted) index, generally available from 26.2 (docs)Inverted index by design, BM25 and vector search
Visibility of new dataAfter an insert completes; batch your insertsNear real time, within 1 second by default (Elastic docs)
LicenceApache 2.0 (licence)ELv2, SSPL, and AGPL as an added option (Elastic)

Sources linked in each cell, checked 4 Dec 2026. Elasticsearch's default refresh is every second, and only on indices that received a search request in the last 30 seconds (Elastic docs). Elastic's query DSL and ES|QL are described on its Cloud tier list (Hosted pricing).

Which is better for logs and observability?

For logs, the choice is between asking aggregate questions in SQL and searching for words with Elastic's tools around it. ClickHouse suits counting, grouping and percentiles over very large volumes. Elasticsearch suits a team that wants free-text search, Kibana and Elastic's observability products out of the box.

Elasticsearch has a dedicated storage mode for logs. Elastic says logsdb index mode cut log storage by up to 60% in its benchmarks, with a 10% to 20% hit to indexing performance, that results vary with your data and version, and that logsdb is the default for new logs data streams from Elastic Stack 9.0 (Elastic docs, checked 4 Dec 2026). That is Elastic's own result on its own data, and we repeat it as a claim to test, not a finding.

ClickHouse stores columns compressed and ClickHouse says analytical data often compresses around 10 times (ClickHouse pricing, checked 4 Dec 2026). Its inserts must be batched, at 1,000 rows or more and ideally 10,000 to 100,000, about one insert a second (ClickHouse docs, checked 4 Dec 2026), so a log shipper that sends events one at a time needs a buffer or asynchronous inserts in front of it. Our view: the decision usually turns on who reads the logs. Engineers who write SQL and want aggregates lean to ClickHouse, and teams that search by phrase in Kibana lean to Elasticsearch.

  • Take a week of your real logs, load them into both, and run the ten queries your team runs most.
  • Measure storage after merges or force-merge, not at ingest time.
  • Count the shipper work: batching for ClickHouse, index templates and lifecycle for Elasticsearch.
  • Price the result with each vendor's metering basis; see the bills section below.

How do inserts, updates and deletes compare?

Both are built for data that is written once and read many times. ClickHouse wants batched inserts and treats ALTER UPDATE as a heavy mutation not meant for frequent use. Elasticsearch accepts single documents, makes them searchable within a second, and re-indexes a whole document on update.

Operation
InsertBatch at 1,000 rows or more, ideally 10,000 to 100,000; about one insert a second; async inserts shift batching to the server (docs)Single documents or the bulk API; refresh makes them searchable within about 1 second
UpdateALTER TABLE ... UPDATE is a mutation; ClickHouse calls it a heavy operation not designed for frequent use (docs)The update API gets the document, runs the change and re-indexes the whole document (API docs)
DeleteLightweight DELETE exists for MergeTree tables; the ALTER ... DELETE form is heavyweight (docs)Delete by document or by query
Best patternAppend, then expire old data by partition or TTLAppend-only time series in data streams that roll over (docs)

Sources linked in each cell, checked 4 Dec 2026, plus the near-real-time model in Elastic's docs. We did not benchmark either. If your data changes row by row, a transactional database is usually the better source of truth, with ClickHouse or Elasticsearch fed from it by change data capture.

How do the bills compare?

The metering bases differ, which matters more than the unit prices. ClickHouse Cloud meters storage on compressed data and compute by the unit-hour. Elastic Serverless meters ingest and retention on the uncompressed, normalized, enriched volume, while Elastic Hosted bills the resources you size.

ComputePer compute-unit hour (8 GiB RAM, 2 vCPU): $0.2181, $0.2985 or $0.3903 by planHosted: resource based. Serverless: as low as $0.14 ingest, $0.09 search, $0.07 ML per VCU-hour
Storage$25.30 per TB-month on compressed dataServerless: as low as $0.047 per GB retained a month, on uncompressed normalized volume
SupportNot listed on the pricing page we readTier-based on Hosted; 5%, 10% or 15% of Serverless spend
IdleCompute scales to zero when idleServerless keeps a baseline of search resources, idle billed at a reduced rate

Sources: ClickHouse pricing and Elastic Serverless pricing, checked 4 Dec 2026. 1 TB at $25.30 is $0.0253 per GB-month against Elastic's $0.047 per GB-month, but the two meter different byte counts, so the rates cannot be compared directly. Full line-by-line costs are in ClickHouse Cloud pricing and Elastic Cloud pricing.

In numbers

What does running each one yourself involve?

Both are real operating work. ClickHouse needs batching, merge and part monitoring, replicas and ClickHouse Keeper. Elasticsearch needs shard sizing, heap and disk watermarks, snapshots and rolling upgrades. Elastic advises 10 GB to 50 GB per shard, ClickHouse about one insert a second.

Area
Capacity limitsParts and merges: too many small inserts back up mergingShards: aim for 10 GB to 50 GB and under 200 million documents each (Elastic docs)
CoordinationClickHouse Keeper for replicated tablesMaster-eligible nodes
BackupsBACKUP and RESTORE to object storageSnapshots to a repository
UpgradesVersion line choice, rolling restartsRolling upgrades, with 8.x to 9.x planning
Where OSStend runs itManaged ClickHouseElasticsearch as a service

OSStend engineers run both engines 24/7 in our cloud, your cloud account, your data center, on Kubernetes or OpenShift, or air-gapped. Each design is written and signed off first, a failover is rehearsed before go-live, and pricing is quoted per design on pricing.

OSStend in numbers
160+customers served
10+years running open source data and messaging
24/7on-call engineers, not a ticket queue
Enterprise only

Who should skip this comparison, and who should pick which?

If your data changes row by row or you need transactions, neither is the first choice. If you run Elastic's own Security or Observability solutions, staying on Elasticsearch is the lower-risk path. If your questions are SQL aggregations over large append-only tables, ClickHouse deserves a trial.

Contact us if

  • You query billions of log or event rows with GROUP BY and want SQL, so run a ClickHouse trial.
  • You need a search box with relevance ranking and facets, so run Elasticsearch.
  • You want to keep Elasticsearch for search and add ClickHouse for the heavy analytics.
  • You must keep data in your own account or data center under a written design.
Talk to an engineer

Not a fit if

  • You rely on Elastic's paid features or its Security and Observability solutions: staying on Elastic is simpler.
  • You need row-level updates and transactions: use a transactional database.
  • You expect a drop-in swap: queries, dashboards and shippers all change.
  • You want a benchmark winner: we publish none, and results depend on your data.
FAQ

ClickHouse vs Elasticsearch questions

Talk to an engineer →

Is ClickHouse faster than Elasticsearch?

It depends on the query. ClickHouse describes itself as built for analytical aggregation over large tables; Elasticsearch is built for finding documents by text. We publish no benchmark, so test your own queries on both before deciding.

Can ClickHouse replace Elasticsearch for logs?

Often, for aggregate questions over logs, because ClickHouse is an analytics database with SQL and a text index available from 26.2 (docs, checked 4 Dec 2026). It replaces less well where teams depend on Kibana, relevance ranking or Elastic's Security and Observability products.

Is ClickHouse cheaper than Elasticsearch?

Not as a rule. The two bills meter different byte counts: ClickHouse bills compressed storage, while Elastic Serverless meters uncompressed, normalized volume. Price your own data on each vendor's calculator, then add the people cost of running it.

Is ClickHouse a search engine?

No. ClickHouse documents itself as a column-oriented SQL database for analytics. It has a text index for finding rows by token, which covers some search needs, but it is not built around relevance ranking the way Elasticsearch is.

Can I run both ClickHouse and Elasticsearch?

Yes, and many teams do: Elasticsearch for search and short-retention troubleshooting, ClickHouse for long-retention analytics, both fed from the same stream. The cost is two systems to operate, which a managed service can carry for you.

Are both open source?

ClickHouse is under the Apache License 2.0 (licence, checked 4 Dec 2026). Elasticsearch is offered under ELv2 and SSPL, and Elastic announced AGPL as a further option (Elastic). The details are in Elasticsearch as a service.

Talk to an engineer

Get a design for ClickHouse, Elasticsearch or both

Bring your data volumes and the queries you run most. An engineer reviews them, writes a design and quotes that design, run 24/7 where you choose.

  • A design sketch for your workload, not a plan menu
  • A zero-downtime cutover path for what you run today
  • A price for that design, after the review
See pricing →

Your request goes to the OSStend team. No newsletter sign-up.

Get a quoteTalk to an engineer
2Engines Optional
3Where should it run?
4What do you need?

Your request goes to the OSStend team. No newsletter sign-up.