How we test, and how we checked ourselves
A benchmark by a database's own authors deserves suspicion. So every engine's request is written down, every raw result is committed, and we audited our own runs before publishing.
Fourteen kinds of query, the mix an app sends
Each engine runs each kind with its closest native request. Where it has none, the kind counts as not run.
| kind | what it asks | in ChloeDB's SQL |
|---|---|---|
| Full text | ||
| BM25 | The 10 best passages for a query | ORDER BY bm25(body, :t) |
| BM25 + filter | The same, within a year range and four categories | WHERE year >= 2010 AND category IN (…) |
| Phrase | Two words of the query in a row required, the rest ranked | bm25(body, '+"a b" words') |
| Prefix | Search as you type: the last word's first three letters | WHERE MATCH(body, 'pre*') |
| Typo-tolerant | The query with two letters of its longest word swapped | bm25(body, :x, fuzzy => 'auto') |
| BM25 × recency | Relevance multiplied by an exponential decay on the year | bm25(…) * decay(year, 2024, 5) |
| Columns and keys | ||
| Facet counts | The top 5 categories among a query's matches | GROUP BY category over MATCH |
| Key lookup | One document by its id | WHERE id = :k, or the key API |
| SQL aggregate | Counts and averages per category over a filter, with HAVING | the same statement in every engine with SQL |
| Vectors | ||
| Vector | The 10 nearest passages to the query's embedding | ORDER BY similarity(emb, :v) |
| Vector + filter | The same, rated 4 or more | WHERE rating >= 4 |
| Similar items | More like this item, minus 20 the user has seen | AND id NOT IN (…) |
| Hybrid | ||
| Hybrid, RRF | BM25 and vector results fused by reciprocal rank, k 60, depth 100 | rrf(bm25(…), similarity(…)) |
| Hybrid, weighted | 0.2 × BM25 plus 0.8 × similarity, each min-max normalised | 0.2 * minmax(…) + 0.8 * minmax(…) |
Every engine's request for every kind is in the method. Engines that shard are also measured on writes and streams.
The same resources, data and settings for all
Kubernetes limits: 6.8 CPUs per engine in the cloud, 3 CPUs and 6 GiB on the laptop. Each engine is told its budget.
Folding, English stopwords, Snowball stemming, BM25 k1 1.2 and b 0.75 everywhere. The Lucene engines' top 10s share 93 to 96% of ChloeDB's.
HNSW m 16, ef_construction 200, 64 candidates, 8-bit codes re-scored where supported.
Result caches off for every engine, its SQL endpoint included, since 5 November (our audit); filter and page caches stay on, and each run records its cache hits. ChloeDB has kept an answer cache since 13 November (0.3.1): the harness starts it with --answer-cache-mb 0 and fails a run in which any answer came from it. The 0.3.5 runs of 16 November ran with it off, and the cloud runs before them on builds from before it. Every answer is recorded and checked.
Images pinned by tag, ChloeDB by commit, data by SHA-256.
What each engine's own docs recommend, committed beside the results.
Latency, throughput and the answers themselves
- Latency: median and 99th percentile at one client, measured at the client.
- Throughput: queries a second at 4 and 16 clients, 6 s per cell over 300 queries, after warm-up.
- Passes: the median of three at 1M (the cold first pass alone would favour ChloeDB). One pass in the 10M run after a longer warm-up, where a second ChloeDB landed within 4.5%; three in its head-to-head on latest main.
- Quality: recall@10 against exact vector search, and nDCG@10 where the collection has judgments.
- Writes: inserts and updates at 16 clients, and time until a write is searchable.
- Streams: a Redpanda topic at rising rates, then a consumer crash; duplicates and losses counted.
Summed places, and other rules
Latencies differ a thousandfold between kinds, so averaging speeds would let the slowest kind decide. Places weigh every test the same: 14 kinds × 3 tests (median, 99th percentile, throughput at 4 clients) plus three recall tests, 45 in all. A kind an engine cannot run counts as last. Load is left out, since ChloeDB's shards were built offline.
What changes the order
ChloeDB stays first at 16 clients and with gaps under 15% as ties. At 1M on latest main it is also first on only the kinds every engine runs and on average place; in the first 1M run Milvus led on both, and at 10M, on the older build, Postgres does.
Where to check it
Each report shows all five rules, generated from raw results by the site's data script. Each run's rank.md also ranks load.
What a skeptic would find in our own files
On 3 November we recomputed every headline from the raw results. Some findings changed these pages; the rest are open limits.
| finding | on these pages |
|---|---|
| The first tables used each engine's coldest pass. On medians, Elasticsearch's BM25 median is 2.74 ms, faster than ChloeDB's 2.96 | Every cluster number is the median of the passes; at 10M every kind is warmed up until it is steady |
| ChloeDB's load was an offline build, the others' HTTP ingestion | Load shown, never ranked |
| "First overall" depends on counting a missing kind as last | The ranking under five rules on every cluster report |
| Throughput at 4 clients is short of saturation; at 16 ChloeDB out-serves the three Lucene engines on fewer kinds | 16-client throughput on every table; the ranking with it |
| Vector speed is compared at a fixed search list, not at matched recall; Elasticsearch's and OpenSearch's recall at 1M (0.72, 0.59) is far below theirs on NQ | Recall beside every vector speed, and since 16 November a sweep of 64 to 512 candidates at 1M for ChloeDB, Elasticsearch, OpenSearch, Solr, Vespa, Qdrant and Postgres (1M), and of 64 to 256 at 10M for ChloeDB, Elasticsearch and OpenSearch. At 64 Elasticsearch and OpenSearch are at 0.74 and 0.65 on 0.3.5's run; the gap to NQ is not explained yet |
| Without a server, ChloeDB searched a query's segments on up to 8 threads, the others on one | A one-thread ChloeDB column on every search chart |
| Key lookups took different paths at 1M: ChloeDB's SQL, the others a search on id | At 10M and in the 1M rerun every engine used its own read by id |
| ChloeDB's updates set one column; the Lucene engines re-index the document | Said beside the results |
| PageRank compares a local push with power iteration over the whole graph | Recall beside every PageRank time |
| Thread pools larger than the CPU limit throttled Vespa (408 s), Postgres (136 s) and Typesense (52 s), against ChloeDB's 18 s | Open: it hurts their tails |
| ChloeDB's coordinator shares the client's node, so its first hop does not cross the network | Since 6 November each shard pod also runs a coordinator, as Elasticsearch's nodes do, and the client calls them across the network (#287); at 1M that costs ChloeDB 4 to 29% at the median on one client. Since 7 November the coordinator runs in the shard's process and answers its own shard without the network (#299) |
| DigitalOcean handed out four Xeon models; the same engine on other nodes moved 12% at the median, and ChloeDB's same image up to 39% on BM25 at 16 clients | Since 4 November each lane's engines take turns on the same nodes, with ChloeDB first and again last: 1.4% apart at the median at 1M and 3.4% at 10M on 4 November, 2.3% and 1.0% on 16 November |
| Last in its lane, Milvus was still compacting during its first two passes, 2 to 3 times slower than alone | Its 1M numbers come from a run alone on a fresh node |
| A slow kind is timed on fewer queries in its 6 seconds (ChloeDB's typo kind on its first 48) | Open |
| The graph run is on a fanless laptop, in a fixed order | Said on the graph page |
| The first graph passes sent ChloeDB's queries as HTTP JSON, while Neo4j, Memgraph and FalkorDB used their binary protocols | Re-run with ChloeDB over gRPC beside HTTP JSON; both on the graph page, gRPC 0.1 ms faster on short hops |
| Elasticsearch's and OpenSearch's SQL aggregate went through their SQL endpoints, where the shard request cache stayed on; its 300 queries repeat 30 years, so their times are likely cached answers | Since #262 the harness turns it off for the whole index and records every engine's cache hits. Run again with it off on 5 November: Elasticsearch 50.1 ms at 1M, against 6.44 cached |
Every number names where it came from
- Cloud, 1M
- DigitalOcean Kubernetes. The rerun: two 4-vCPU nodes (Xeon Platinum 8280, 8168) for the engines that shard, one 8-vCPU node (8280) for the rest, Milvus alone on another (8358). The first run: 4- and 8-vCPU nodes; Xeon Platinum 8168, 8280, 8358 and Gold 6248
- Cloud, 10M
- The same layout on m3 nodes; Xeon Platinum 8168, 8280, Gold 6248, 5318Y. Milvus and Redis on 128 GB. The head-to-head on latest main: two m3 nodes (8168, 8280)
- Laptop cluster
- MacBook Air M2, 24 GB; kind in Docker Desktop, 4 CPUs
- No server
- DigitalOcean 8 vCPU: Xeon Platinum 8358 on 17 November, as on 2 and 6 November (an 8168 on 16 November); Xeon Gold 6548N for Tantivy as the app's store
- Graph
- MacBook Air M2; 3 CPUs and 6 GB per engine
- BM25 under load
- A 4-vCPU cloud container, Xeon at 2.10 GHz
Every run is a script in the repository
cd chloedb-server
deploy/kind-test.sh up
deploy/compare/compare.sh image
deploy/compare/compare.sh up es
deploy/compare/compare.sh load es
deploy/compare/compare.sh run es
deploy/compare/compare.sh down escd chloedb-server
IMAGE=ghcr.io/chloetech-ai/chloedb-server:<sha> \
BUDGET=30 deploy/compare/fanout.sh run
deploy/compare/fanout.sh analyze results/
deploy/compare/fanout.sh downcd chloedb-py/bench/laptop
./do_part_a.sh up && ./do_part_a.sh push
./do_part_a.sh setup && ./do_part_a.sh prep
./do_part_a.sh run
./do_part_a.sh fetch results/ && ./do_part_a.sh downpython3 docs/site/scripts/bench_data.pyFull steps and costs: deploy/compare/README.md. Think an engine is set up badly? Open an issue with the setting you would use and we will run it again.