ClickHouse for time-series databases

Pick 2 of 3 for time-series databasesOfficialClickHouse793

Time-series data has its own access pattern: append-heavy writes, time-bucketed reads, downsampling, high cardinality. ClickHouse's official MCP server runs read-only SQL against a column store that handles that volume well, and it is our second pick of three: a strong choice when your time-series lives in a columnar engine built for fast aggregation over huge spans.

The framing here is the query model. ClickHouse answers time-series questions in SQL rather than a purpose-built protocol, which suits teams already storing metrics and events in a column store. It ranks second because one sibling is a dedicated time-series database with native line protocol.

How ClickHouse fits

An agent works the data through three tools that matter here: list_databases and list_tables for schema awareness (column and engine metadata included), so it knows the time and value columns before querying, and run_select_query to run time-bucketed aggregations in a read-only session by default, which fits questions like throughput during an incident window or this week versus last. run_chdb_select_query covers series sitting in local files or at a URL through chDB's embedded engine, gated by the chDB extra and CHDB_ENABLED.

The honest limits are the missing time-series conveniences. ClickHouse has no built-in line protocol ingestion or PromQL; you express downsampling and bucketing as SQL yourself. InfluxDB, our top pick, is the purpose-built TSDB with SQL and line protocol and native time-series functions. Prometheus is the right tool when your metrics are queried with PromQL and scraped rather than written. Reach for ClickHouse when the time-series volume is large, the store is already columnar, and SQL is the query language you want.

Tools you would use

ToolWhat it does
list_databasesLists all databases on the connected ClickHouse cluster.
list_tablesLists the tables in a database, with column and engine metadata and pagination support.
run_select_queryExecutes a SQL SELECT query against the ClickHouse cluster in a read-only session by default.
run_chdb_select_queryRuns a SELECT query through chDB's embedded engine over local files or URLs (requires the chDB extra and CHDB_ENABLED).
Full ClickHouse setup and config →

FAQ

Does ClickHouse's server support PromQL or line protocol?
No. It runs SQL through run_select_query (read-only by default) with list_databases and list_tables for schema. You express time bucketing and downsampling as SQL. For line protocol use InfluxDB, our top pick; for PromQL use Prometheus.
When does ClickHouse beat InfluxDB for time series?
When your series data is large and already lives in a columnar store, and you want to query it with SQL. ClickHouse aggregates over huge time spans fast via run_select_query. InfluxDB ranks first as the purpose-built TSDB with native line protocol and time-series functions.