v.25.10Experimental Feature

QBit data type

Implement QBit data type that stores vectors in bit-sliced format and L2DistanceTransposed function that allows approximate vector search where precision-speed trade-off is controlled by a parameter. #87922 (Raufs Dunamalijevs).
Introduces the QBit data type which stores vectors in a bit-sliced format, alongside the L2DistanceTransposed function that enables approximate vector search with a tunable precision-speed trade-off.

Why it matters

This feature addresses the need for efficient vector storage and fast approximate similarity search in ClickHouse. By using a bit-sliced representation for vectors via QBit, and providing the L2DistanceTransposed function that allows users to control the balance between search accuracy and performance, it enhances ClickHouse's capability to perform large-scale vector similarity queries more efficiently.

How to use it

Users can define table columns using the QBit data type to store vectors in bit-sliced format. For approximate nearest neighbor search, they can use the L2DistanceTransposed function in their queries, adjusting its parameter to control the trade-off between result precision and query speed.