← Back to all projects

ClickHouse

Columnar SQL database that agent tracing stacks are built on

OfficialApache-2.0
Stars
50.7k
Forks
9.2k
Open issues
8.6k
Last commit
30 Oct 2026

What is ClickHouse?

A column-oriented engine for append-heavy, high-cardinality data, which is the shape agent telemetry takes: one row per model call, filtered later by model, cost or error. Langfuse moved its traces here from Postgres in December 2024 and ClickHouse acquired the project in January 2026, so a self-hosted observability stack increasingly means running this underneath. It is the wrong choice for anything transactional — updates and deletes rewrite whole column parts rather than edit rows — so treat it as where agent runs land, not as the database your application writes state to.

What can you do with ClickHouse?

  • Store one row per model call — Columnar storage means a query filtering observations by model, cost or error status reads only those columns while multi-megabyte prompt and completion payloads stay on disk, and the engine is built for large batch inserts merged in the background rather than single-row writes — which is how a queued trace ingestion pipeline wants to write.
  • Inherit the storage layer under Langfuse — Langfuse moved tracing data out of Postgres into ClickHouse in December 2024, and ClickHouse acquired Langfuse on 16 January 2026, saying the core stays MIT-licensed and self-hostable at production scale. ClickStack, its OpenTelemetry-native observability stack, runs on the same engine.
  • Search embeddings without a second database — A vector_similarity index builds an HNSW graph over Array(Float32), Array(Float64) or Array(BFloat16) columns with L2Distance, cosineDistance or dotProduct, available from version 25.8. The index has to be loaded from disk into memory in full to serve a search, and building it slows inserts and merges.
  • Expect exact scans once you filter — Pre-filtering by metadata is, in the documentation's own words, an unsolved problem — ClickHouse falls back to exact nearest-neighbour search — and post-filtering can return fewer rows than the LIMIT asked for when candidates fail the WHERE clause. If narrow metadata filters over a large collection are your main access pattern, a dedicated vector store handles it better.
  • Let an agent query it over MCP — ClickHouse publishes mcp-clickhouse in a separate repository, exposing list_databases, list_tables and run_query plus a chDB tool for embedded queries. It runs read-only unless CLICKHOUSE_ALLOW_WRITE_ACCESS=true is set, with DROP and TRUNCATE behind a second flag.

Star history

16 Aug to 30 Oct · +1.4k

49.3k50.7k

Frequently asked questions

Is ClickHouse free for commercial use?

ClickHouse is released under the Apache-2.0 licence — OSI-approved open source, which permits commercial use.

How can ClickHouse be deployed?

ClickHouse is available as Self-hosted / Runs locally / Managed cloud.