cd /news/ai-search/duckdb-and-infino-on-sql-keyword-vec… · home › topics › ai-search › article
[ARTICLE · art-181332] src=infino.ai ↗ pub= topic=ai-search verified=true sentiment=· neutral

DuckDB and Infino on SQL, keyword, vector and hybrid search

Infino 0.13.2 beat DuckDB 2.0.1 on keyword, vector and hybrid search workloads while DuckDB stayed about 20% faster on SQL analytics over its own storage format, according to a benchmark run by Infino on one Azure Standard_D8ds_v7 machine (8 vCPU, 32 GiB). On 5 million English Wikipedia articles, DuckDB's match_bm25 took about 6,000 ms per query versus 0.30 ms for Infino and 0.62 ms for Lucene 10.6.0 on top-10 keyword queries, and Infino was about 2x faster on vector search at equal recall and 10x faster on hybrid search. On ClickBench's 43 queries over 100 million rows, DuckDB totaled 25.1 s versus Infino's 30.5 s on a c6a.4xlarge and 4.99 s versus 6.08 s on a c8g.metal-48xl, though DuckDB on Parquet was 11% and 33% slower than Infino on the two machines respectively.

recommendation

For keyword or hybrid retrieval over millions of documents, use a dedicated search engine like Infino or Lucene rather than DuckDB's fts extension, which took about 6,000 ms per query versus 0.30 ms.

more in playbook: Retrieval and RAG
by read7 min views2 publishedDec 3, 2026
DuckDB and Infino on SQL, keyword, vector and hybrid search
Image: Infino (auto-discovered)

DuckDB is a popular analytics database, and like a lot of analytics tools it has added search: its fts extension does BM25 full-text search and its vss extension does HNSW vector search. We wanted to see how far those extensions go, so we ran DuckDB against Infino on four workloads: SQL analytics, keyword search, vector search and hybrid search.

DuckDB is faster on SQL analytics over its own storage format. Infino is faster on the three search workloads: about 2x on vector search at the same recall, 10x on hybrid search, and thousands of times on keyword search.

Setup #

The SQL numbers come from the public ClickBench results. For search, we ran DuckDB 2.0.1 and Infino 0.13.2 (the Python package) on one Azure Standard_D8ds_v7 (8 vCPU, 32 GiB, local NVMe), with Lucene 10.6.0 as a reference for keyword search. Data was on local disk, not object storage.

Every engine got the same data and the same queries. Queries ran one at a time on a warm engine, with a warm-up pass before timing. We used default settings, except for DuckDB’s HNSW ef_search, which we swept so DuckDB could reach the same recall as Infino. A query an engine couldn’t run counted as unsupported.

SQL analytics #

ClickBench runs 43 analytical queries over 100 million rows of web traffic. These are the hot-run totals from the latest public results: for each query, the faster of the second and third runs, summed.

Machine DuckDB DuckDB on Parquet Infino
c6a.4xlarge (16 vCPU) 25.1 s 33.9 s 30.5 s

| c8g.metal-48xl (192 vCPU) | 4.99 s | 8.10 s | 6.08 s | On its own format, DuckDB is about 20% faster than Infino on both machines. On Parquet, the format Infino stores its data in, DuckDB is 11% slower than Infino on the smaller machine and 33% slower on the larger one.

ClickBench doesn’t test text ranking, vector search or score fusion, so we measured those ourselves.

We used Search Benchmark, the Game, which runs 962 real queries against 5 million English Wikipedia articles on a single thread. We added a DuckDB engine that uses match_bm25.

DuckDB took about 6 seconds per query, so it ran a stratified sample of 101 queries, timed once after a warm-up. Infino and Lucene ran the same sample with the harness’s usual best of 10. DuckDB can’t run phrase or exclusion queries, which ruled out 38 of the 101. Mean latency on the other 63:

Query DuckDB Infino Lucene
Top 10 6,241 ms 0.30 ms 0.62 ms
Top 100 6,025 ms 0.47 ms 0.97 ms
Top 1000 6,049 ms 0.80 ms 1.74 ms
Top 100 and count 6,006 ms 1.12 ms 3.43 ms
Count 6,009 ms 0.27 ms 0.68 ms

DuckDB, Infino and Lucene returned the same hit counts on all 63 queries. DuckDB’s time barely changes between query types because match_bm25 scores every document in the table. It doesn’t skip through posting lists or stop once it has the top k. DuckDB’s full-text index also doesn’t update when rows change. It has to be rebuilt.

On the full 962 queries, Infino takes 0.49 of Lucene’s time on top-k queries and 0.39 on counts.

Index build Time Size
Infino 133 s 2.5 GB
Lucene 129 s 2.7 GB
DuckDB 165 s 13 GB, including the article text

We used Cohere 1M from VectorDBBench: 1 million 768-dimension embeddings, cosine similarity, and 1,000 queries with exact ground truth, at k = 10. DuckDB used the vss HNSW index at four ef_search values. Infino used its defaults.

Engine ef_search Recall@10 p50 p95
DuckDB 64 (default) 0.937 3.2 ms
DuckDB 128 0.967 4.0 ms
DuckDB 256 0.979 5.3 ms
DuckDB 512 0.989 8.1 ms 9.6 ms
Infino n/a 0.991 3.9 ms 6.2 ms

At recall 0.99, Infino’s median is 3.9 ms and DuckDB’s is 8.1 ms. DuckDB at its default ef_search is faster, at recall 0.937.

DuckDB builds its HNSW index in memory. Keeping it on disk needs an experimental setting, so by default every new process builds it again, which took 212 s on this data. Infino loaded the data and built its index in 92 s, and the table is 4.5 GB on disk.

We took 1 million English passages from Cohere’s Wikipedia 2023-11 embeddings (1024 dimensions) and used the next 1,000 passages as queries. Each query searches the passage title as keywords and its embedding as the vector.

DuckDB and Infino can both answer a hybrid question in one SQL statement, and both can add a graph hop to that statement: Infino with its graph_walk table function, DuckDB with the DuckPGQ extension. We measured text and vector here, not graph.

DuckDB and Infino each take the BM25 top 100 and the vector top 100 and combine them with reciprocal rank fusion (k = 60). Infino uses its hybrid_search table function. DuckDB uses two CTEs and fuses them in SQL.

Engine p50 p95
DuckDB 80 ms 340 ms
Infino 8.0 ms 12.1 ms

Infino’s median is 10 times lower and its p95 28 times lower. DuckDB and Infino share 80% of their top 10 results. The rest comes down to how each tokenizes text for BM25.

Limitations of the extensions #

Apart from speed, the extensions leave gaps that showed up in the tests above.

DuckDB Infino
Phrase and exclusion queries Not supported by match_bm25 , which ruled out 38 of the 101 sampled queries Supported
Top-k keyword search Scores every document in the table Skips through posting lists and stops at the top k
Full-text index when rows change Rebuilt by hand Kept up to date as rows are written
Vector index on disk Needs an experimental setting. By default it is rebuilt in every new process, 212 s on Cohere 1M Stored with the table
Hybrid search Two CTEs and rank fusion written by hand in SQL One hybrid_search table function

Summary #

DuckDB is an analytical database with search extensions. Infino is a search engine that runs SQL over Parquet. If your queries scan and aggregate columns, DuckDB on its own format is faster. If they rank text, vectors or both, Infino was faster on the keyword, vector and hybrid tests above.

What it means for agents #

The questions agents ask mix all of these at once. “How many errors last night mention disk full or look like a capacity incident, and which team owns the service?” needs a keyword search, a vector search, a filter, a count and a join. To Infino that is one SQL statement, and the search parts of it are the ones measured above.

An agent also asks many of these questions to finish one task, each building on what the last one returned, so retrieval time adds up. At DuckDB’s 6 seconds per keyword search, ten steps take a minute. At Infino’s 0.3 ms per keyword search and 8 ms per hybrid search, ten steps take under a tenth of a second.

── more in #ai-search 4 stories · sorted by recency
── more on @duckdb 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/duckdb-and-infino-on…] indexed:0 read:7min 2026-12-03 · —