

ClickHouse's vector search extension that adds kNN similarity search capabilities to the ClickHouse columnar database, enabling hybrid analytical + vector queries at scale.
Loading more......
QBit is a column type in ClickHouse designed for vector search that stores floats as bit planes instead of whole numbers. It enables users to choose how many bits to read during vector search, tuning recall and performance without changing the underlying data.
CREATE TABLE fruit_animal
(
word String,
vec QBit(Float64, 5)
)
ENGINE = MergeTree
ORDER BY word;
SELECT word, L2DistanceTransposed(vec, [...], 16) AS distance
FROM fruit_animal
ORDER BY distance;
Precision level 16 on Float64 (64 bits) reads only 25% of the data, skipping 75%.
| Approach | Precision | Speed | Trade-offs |
|---|---|---|---|
| Brute-force | Perfect | Slow | High resource usage |
| HNSW | Great | Fast | Index must fit in memory, parameters chosen upfront |
| QBit | Flexible | Flexible | Still O(n) for number of records |
QBit is part of ClickHouse, which is open-source and free to use.