For financial market data in 2026, QuestDB is the best default if you want a purpose-built tick database with native ASOF JOIN, SAMPLE BY and nanosecond timestamps under an Apache 2.0 license. ClickHouse wins when market data is one dataset inside a much larger analytics platform and you need very large scans and joins. TimescaleDB is the right call when your team and tooling are already Postgres and you need relational integrity next to your time series. kdb+ (now KDB-X) is still the reference point in banks, but it is commercial software from KX, and you choose it for its ecosystem rather than for its license.
The rest of this comparison covers the features that decide market-data workloads: storage model, ingestion protocols, as-of joins, OHLCV bars, late data, compression and licensing. Each SQL example is written for the current release of each engine.
What market data actually asks of a database
Tick and quote data is unusual even among time-series workloads:
- Very high write rates in bursts. Market opens and news events produce peaks far above the average rate.
- Point-in-time joins. Trade-to-quote matching, mark-to-market and transaction cost analysis all need "the last quote at or before this trade". That is an as-of join, and plain SQL makes it awkward.
- Bar aggregation. OHLCV bars at 1s, 1m and 1h, usually precomputed for dashboards and recomputed for research.
- Late and out-of-order data. Multiple venues, replays and backfills arrive out of timestamp order.
- Precision. Nanosecond timestamps for some feeds, and exact decimals for prices if you do accounting on them.
- Cheap history. Years of ticks that are rarely touched but must stay queryable.
The contenders at a glance
Versions are as of November 17, 2026, from each project's GitHub releases.
| QuestDB | TimescaleDB | ClickHouse | kdb+ / KDB-X | |
|---|---|---|---|---|
| Latest release | 10.2.0 (Nov 10, 2026) | 2.32.0 (Nov 12, 2026) | 26.10 stable, 26.8 LTS | Commercial (KX) |
| What it is | Purpose-built time-series database | PostgreSQL extension | Column-oriented OLAP database | Column store with the q language |
| Core license | Apache 2.0 | Apache 2.0 edition plus TSL Community Edition | Apache 2.0 | Proprietary, free Community Edition |
| Query language | SQL with time-series extensions | PostgreSQL SQL | ClickHouse SQL | q (plus SQL interfaces) |
| Native as-of join | ASOF JOIN, LT JOIN, SPLICE JOIN, WINDOW JOIN |
No (use LATERAL) |
ASOF [LEFT] JOIN |
aj |
| Time bucketing | SAMPLE BY |
time_bucket() |
toStartOfInterval() |
xbar |
| Finest timestamp | timestamp_ns (nanoseconds) |
Microseconds (timestamptz) |
DateTime64(9) (nanoseconds) |
Nanoseconds |
| Managed offering | Enterprise (self-managed or BYOC) | Tiger Cloud | ClickHouse Cloud | Sold and supported by KX |
Storage model
QuestDB stores each table as columns partitioned by time. Writes go first to a write-ahead log. The table writer then applies them to native column files, handling out-of-order rows and deduplication on the way. Older partitions can be converted to Parquet: by hand with ALTER TABLE ... CONVERT PARTITION TO PARQUET in open source, or automatically through storage policies in QuestDB Enterprise. Parquet partitions use lz4_raw by default. A designated timestamp column is central to the design: SAMPLE BY, partitioning and the time-series joins all depend on it.
TimescaleDB turns a PostgreSQL table into a hypertable that is chunked by time, with a default chunk interval of 7 days. Its Hypercore engine writes new data to a rowstore and converts colder chunks to a columnstore, segmented by a column such as symbol and ordered by time. Since 2.20 you can declare everything in CREATE TABLE:
CREATE TABLE trades (
ts TIMESTAMPTZ NOT NULL,
symbol TEXT NOT NULL,
price DOUBLE PRECISION,
amount DOUBLE PRECISION
) WITH (
tsdb.hypertable,
tsdb.partition_column = 'ts',
tsdb.segmentby = 'symbol',
tsdb.orderby = 'ts DESC'
);
ClickHouse uses the MergeTree engine family. Each insert creates an immutable, sorted part, and background merges combine parts. The ORDER BY key is your primary index, so (symbol, ts) is the usual choice for tick data:
CREATE TABLE trades
(
ts DateTime64(9, 'UTC') CODEC(DoubleDelta, ZSTD),
symbol LowCardinality(String),
price Float64 CODEC(Gorilla, ZSTD),
amount Float64,
trade_id UInt64
)
ENGINE = MergeTree
PARTITION BY toYYYYMMDD(ts)
ORDER BY (symbol, ts);
The QuestDB equivalent is short. Change TIMESTAMP to TIMESTAMP_NS if your feed carries nanoseconds:
CREATE TABLE trades (
ts TIMESTAMP,
symbol SYMBOL,
price DOUBLE,
amount DOUBLE
) TIMESTAMP(ts) PARTITION BY DAY;
Ingestion protocols
| Engine | Primary high-rate path | Other paths |
|---|---|---|
| QuestDB | QWP (QuestDB Wire Protocol): binary, columnar, over WebSocket, new in 10.0 | InfluxDB Line Protocol (ILP) over HTTP/TCP, PostgreSQL wire, CSV import |
| TimescaleDB | PostgreSQL COPY and batched multi-row INSERT |
Any Postgres driver, logical replication, Kafka Connect JDBC sink |
| ClickHouse | Native TCP protocol with large batches | HTTP interface, async_insert for many small writers, Kafka table engine, dozens of input formats |
| kdb+ | IPC from feed handlers into a tickerplant | Vendor feed handlers |
QuestDB 10.0 introduced QWP as the recommended protocol for both writes and reads. ILP and PG wire stay for backward compatibility. If you already run ILP clients, nothing breaks, but new builds should start on QWP.
On ClickHouse, the main ingestion mistake is many tiny inserts. Each insert is a part, and too many parts means merge pressure and eventually rejected writes. Batch on the client, or enable async_insert so the server batches for you. If a Kafka cluster feeds all three engines, the broker choice is a separate decision; see our Redpanda vs Kafka guide.
As-of joins: matching trades to the prevailing quote
This feature separates purpose-built engines from general SQL. Here is the same "last quote at or before each trade" query in each engine.
QuestDB. ASOF JOIN matches on the designated timestamps. ON (symbol) keys the match per instrument, and TOLERANCE caps how stale a quote can be, which also lets the scan stop early:
SELECT t.ts, t.symbol, t.price, q.bid, q.ask
FROM trades t
ASOF JOIN quotes q ON (symbol) TOLERANCE 1s
WHERE t.ts IN '$today';
QuestDB also has LT JOIN (strictly before), SPLICE JOIN (full as-of in both directions) and, since 9.3, WINDOW JOIN for aggregating the right table over a time window around each row.
ClickHouse. ASOF is a join strictness. You need exactly one closest-match condition, and with the default hash algorithm at least one equality condition:
SELECT t.ts, t.symbol, t.price, q.bid, q.ask, q.ts AS quote_ts
FROM trades AS t
ASOF LEFT JOIN quotes AS q
ON t.symbol = q.symbol AND q.ts <= t.ts
WHERE t.ts >= now() - INTERVAL 1 HOUR;
One gotcha: unmatched rows in a ClickHouse LEFT JOIN get the column type's default value (0 for numbers) unless you set join_use_nulls = 1. A bid of 0.0 in a TCA report is a bug waiting to happen.
TimescaleDB. PostgreSQL has no ASOF JOIN syntax. The idiomatic version is a LATERAL subquery that uses an index on (symbol, ts DESC):
SELECT t.ts, t.symbol, t.price, q.bid, q.ask, q.ts AS quote_ts
FROM trades t
LEFT JOIN LATERAL (
SELECT q.ts, q.bid, q.ask
FROM quotes q
WHERE q.symbol = t.symbol
AND q.ts <= t.ts
ORDER BY q.ts DESC
LIMIT 1
) q ON true
WHERE t.ts >= now() - INTERVAL '1 hour';
This is correct and fast enough for thousands of rows, because each lookup is one index probe. Across millions of trades it runs as millions of index probes, while the native engines do a single merge-style pass. If as-of joins over full sessions are your core workload, that difference decides the choice on its own.
OHLCV bars in three dialects
Here are 1-minute bars with open, high, low, close and volume, per symbol, for the current day.
QuestDB. SAMPLE BY aligns to calendar boundaries by default, and first() and last() follow the designated timestamp order:
SELECT
ts,
symbol,
first(price) AS open,
max(price) AS high,
min(price) AS low,
last(price) AS close,
sum(amount) AS volume
FROM trades
WHERE ts IN '$today'
SAMPLE BY 1m;
To keep bars up to date for dashboards, wrap the same query in CREATE MATERIALIZED VIEW ... REFRESH IMMEDIATE AS (...). The QuestDB OHLC cookbook shows the full statement.
TimescaleDB. first(value, time) and last(value, time) are TimescaleDB aggregates that take the ordering column explicitly:
SELECT
time_bucket('1 minute', ts) AS bucket,
symbol,
first(price, ts) AS open,
max(price) AS high,
min(price) AS low,
last(price, ts) AS close,
sum(amount) AS volume
FROM trades
WHERE ts >= date_trunc('day', now())
GROUP BY bucket, symbol
ORDER BY bucket, symbol;
For incremental bars, put this query in a continuous aggregate. The Toolkit extension also has candlestick_agg(ts, price, volume) with open(), high(), low(), close() and volume() accessors.
ClickHouse. Use argMin/argMax keyed on time for open and close. ClickHouse documents that ties return a non-deterministic row. Two trades in the same nanosecond are common on busy symbols, so break ties with a tuple:
SELECT
toStartOfInterval(ts, INTERVAL 1 MINUTE) AS bucket,
symbol,
argMin(price, (ts, trade_id)) AS open,
max(price) AS high,
min(price) AS low,
argMax(price, (ts, trade_id)) AS close,
sum(amount) AS volume
FROM trades
WHERE ts >= toStartOfDay(now())
GROUP BY bucket, symbol
ORDER BY bucket, symbol;
For precomputed bars, use a materialized view into an AggregatingMergeTree with argMinState/argMaxState.
The three dialects look alike, but they differ in how they handle ties and in where incremental maintenance lives. QuestDB and TimescaleDB order first/last by time. ClickHouse makes you choose the tie-breaker, which is more work but also more honest.
Out-of-order and late data
- QuestDB accepts out-of-order rows through the WAL and rewrites only the affected partitions. Heavy out-of-order commits can split a partition to limit the rewrite. Late writes into Parquet partitions cost more than into native ones, so set conversion delays longer than your typical lateness.
DEDUP UPSERT KEYS(...)makes replays idempotent, and 10.2 addedDEDUP SKIPto keep the first-written row. - TimescaleDB treats late data as an ordinary
INSERT. The docs state thatINSERT,UPDATE,DELETEandUPSERTwork directly on the columnstore. Postgres constraints andON CONFLICTgive you dedup semantics most engineers already know. - ClickHouse has no notion of arrival order. Each part is sorted at insert and merged later. Deduplication goes through
ReplacingMergeTree, which collapses duplicates eventually, at merge time, not at insert. Queries that must be exact either useFINALor aggregate around the duplicates.
Compression and tiering
All three compress columnar data well. The useful questions are which knobs you get and where history lives.
- QuestDB: Parquet partitions with configurable codecs (
lz4_rawby default, plus ZSTD and others). Moving Parquet partitions to object storage is an Enterprise storage-policy feature. - TimescaleDB: columnstore compression is applied per segment (for example, per symbol) after chunks age out. It is a TSL Community Edition feature, not part of the Apache 2 edition.
- ClickHouse: per-column codecs. LZ4 is the default when self-managed and ZSTD on ClickHouse Cloud. Specialized codecs such as
DoubleDeltaandGorillastack with a general codec. TTL rules can move old parts to cheaper disks or object storage.
I'm not quoting compression ratios. They depend heavily on tick entropy, symbol cardinality and sort keys, and every vendor's figure comes from its own dataset.
JSON and semi-structured data
Market data is mostly fixed-schema, but reference data, order metadata and venue-specific fields often arrive as JSON. ClickHouse has a native JSON column type, marked production-ready in 25.3. TimescaleDB inherits PostgreSQL's jsonb and GIN indexes. QuestDB has no JSON column type. It stores JSON as varchar and extracts fields with json_extract(), and its docs suggest promoting hot fields to real columns. If "native JSON" is a hard requirement, ClickHouse and TimescaleDB qualify and QuestDB does not.
Licensing and managed offerings
- QuestDB: the core is Apache 2.0. Replication with failover, RBAC, TLS, SSO and tiered storage are in QuestDB Enterprise, offered self-managed or BYOC. The pricing page lists no fully managed SaaS as of November 2026.
- TimescaleDB: there are two editions. The Apache 2 Edition gets hypertables,
time_bucketandfirst/last. Continuous aggregates, the columnstore, retention policies,time_bucket_gapfilland jobs require the Community Edition under the Timescale License, which bars third parties from offering it as a database-as-a-service. Many managed Postgres services therefore ship only the Apache edition. CheckSHOW timescaledb.license;before you design around compression. The fully managed option is Tiger Cloud, from Timescale's successor company Tiger Data. - ClickHouse: Apache 2.0 with no feature split in the server. ClickHouse Cloud is the vendor's managed service.
- kdb+ / KDB-X: proprietary. KX released a free KDB-X Community Edition in November 2025. Read its license terms before you plan production use.
A note on benchmarks
You will find plenty of benchmark charts for these databases. Read them as directional at best. TSBS (Time Series Benchmark Suite) was created by Timescale and models DevOps and IoT workloads, not order books. ClickBench is maintained by ClickHouse and measures analytical queries over a web-analytics dataset. Both are open and reproducible, but neither tests as-of joins over tick data. QuestDB, Timescale and ClickHouse all publish results on their own blogs, and those are vendor-run. The only benchmark that matters is your own: one real trading day of trades and quotes, your bar intervals and your as-of joins, on the hardware you'd actually buy.
Decision table
| If your situation is... | Pick | Why |
|---|---|---|
| Dedicated tick store, quant research and live dashboards | QuestDB | Native as-of and window joins, SAMPLE BY, nanosecond timestamps, Apache 2.0 core |
| Market data is one dataset in a large analytics warehouse | ClickHouse | Large scans and joins across many datasets, mature managed cloud, native JSON |
| Postgres shop, transactional data next to prices, ORMs and BI on Postgres | TimescaleDB (Community Edition or Tiger Cloud) | Full SQL and relational integrity; you give up native as-of joins |
| Tier-1 bank with existing q code and KX support contracts | kdb+ / KDB-X | Ecosystem and incumbency, not cost |
| Need a managed service with zero ops, today | ClickHouse Cloud or Tiger Cloud | QuestDB's commercial offer is self-managed or BYOC |
| Must run on a third-party managed Postgres | Check the edition first | Many ship only the Apache 2 edition without columnstore or continuous aggregates |
For the broader landscape of time-series engines, our AI-native time-series database roundup covers more options. For ClickHouse against embedded analytics, see DuckDB vs ClickHouse.
Frequently Asked Questions
What is the best time series database for financial market data in 2026?
For a dedicated tick and quote store, QuestDB is the strongest open-source fit, thanks to native as-of joins, SAMPLE BY bars and nanosecond timestamps. ClickHouse is better when market data sits inside a much larger analytics platform. TimescaleDB is best when you're committed to PostgreSQL.
Which time series database is lowest latency for trading?
No vendor-neutral benchmark measures the queries trading teams care about, such as as-of joins and bar aggregation on live ticks. QuestDB and kdb+ are designed around that access pattern, and ClickHouse is designed for large analytical scans. Run a one-day replay of your own feed on each candidate before you trust any published number.
Does TimescaleDB support ASOF JOIN?
No. TimescaleDB is a PostgreSQL extension, and PostgreSQL has no ASOF JOIN syntax. You get the same result with a LEFT JOIN LATERAL ... ORDER BY ts DESC LIMIT 1 subquery backed by an index on (symbol, ts DESC). It is correct but executes as one index probe per left-side row.
Is ClickHouse good for tick data?
Yes, if you design the table for it: ORDER BY (symbol, ts), DateTime64(9) timestamps, batched or async inserts, and tie-safe argMin/argMax for open and close. It has native ASOF JOIN. Watch out for default values instead of NULLs in unmatched LEFT JOIN rows, and for duplicates that only collapse at merge time with ReplacingMergeTree.
Which time series databases have native JSON support?
ClickHouse has a native JSON column type, production-ready since 25.3. TimescaleDB inherits PostgreSQL's jsonb. QuestDB stores JSON as varchar and parses it at query time with json_extract(), which its docs say is much slower than a dedicated column.
Bottom Line
Choose by data shape and team, not by benchmark charts. If tick data is the product and as-of joins run all day, start with QuestDB, and budget for Enterprise if you need replication. If market data is one input to a broad analytics platform, ClickHouse with a careful schema handles it well. If Postgres is your system of record, TimescaleDB keeps everything in one database, at the cost of LATERAL as-of joins and a license check on your hosting provider. Then replay one real trading day on your top two candidates before you commit.