▣datahall
← back to gallery
serverJavaest. 2019Apache-2.0

QuestDB

Time-series SQL at columnar speed: time-partitioned native storage with SIMD scans.

QuestDB is a time-series SQL database with its own columnar storage engine, SQL over InfluxDB line protocol, and SIMD-accelerated scans. Tables partition by time natively, out-of-order writes are first-class, and sample-by aggregation downsizes series at query time. It competes on ingestion throughput with a Postgres-compatible wire protocol.

Ingest
line protocol + ILP over TCP/HTTP
Storage
native columnar, time-partitioned
Out-of-order
first-class OO updates
SQL
Postgres wire + Influx line

Native time partitions

Tables partition by DAY/MONTH/YEAR natively — every query prunes partitions by its WHERE time clause before touching columns.

Symbol type

Low-cardinality strings store as integer codes over a dictionary — repeated identifiers compress to 4 bytes and filter with integer compares.

SIMD scans

Aggregations compile to SIMD instructions over primitive column arrays — group-bys and filters run at memory bandwidth.

Out-of-order engine

Late-arriving data merges into committed partitions without rewrites — the OO engine tracks committed and OOMax timestamps per column.

Time-series SQL without a bolt-on

QuestDB treats time as a storage primitive: tables partition by time, SAMPLE BY aggregates at query time, ASOF JOIN aligns series by nearest timestamp — operations that need window-function gymnastics elsewhere are single clauses.

Ingestion speaks InfluxDB line protocol, so collectors migrate without changes; queries speak the Postgres wire protocol, so dashboards connect as if it were Postgres.

              SELECT location, avg(temp)
FROM readings
WHERE timestamp IN '2026-10'
SAMPLE BY 1h ALIGN TO CALENDAR;
            

Storage: columns, partitions, symbol dictionaries

Each column is its own memory-mapped file per partition; fixed-width primitives scan with SIMD, variable data (strings) uses an indirection table. The symbol dictionary trades a dictionary lookup for 4-byte storage on every repeated value.

Diagrams

pipelineIngest path: ILP/TCP → OOO commit → columnar partition filesclick nodes for description
stage 1executionplaceholderstage 2storageplaceholdermode: write

[caption] Commit happens per partition with committed/OOMax timestamps per column.

Line-protocol events append into partition column files; out-of-order timestamps merge via the OO engine; symbol columns store dictionary codes.

time-seriesSAMPLE BY vs raw pointsclick nodes for description

Raw one-second points against a 1-minute SAMPLE BY average — query-time downsampling over native partitions.

97.9101104107.102550
raw (1s)SAMPLE BY 1m (illustrative)req/s

[caption] Illustrative shapes — SAMPLE BY runs as a native aggregate over partition columns.

Raw one-second points against a 1-minute SAMPLE BY average — query-time downsampling over native partitions.