OriginChainDB
Vector search

IVF-PQ (residualised).

IVF-PQ combines grouped search with compressed vectors. IVF selects groups of candidates; product quantization (PQ) represents each vector using short codes. The residual form encodes a vector’s difference from its group centroid.

Compare compressed differences within vector groupsShort PQ codes approximate vectors; their size alone is not total database memory usage.
  1. Choose the vector’s groupFind its representative centroid.
  2. Calculate the remaining differenceRepresent what the centroid does not capture.
  3. Store short PQ codesEncode that difference with the trained codebook.
  4. Estimate candidate distancesCheck approximate matches against an exact-search baseline.

Why residualised matters.

The centroid already represents the group’s rough location. Encoding only the remaining difference can use the compressed codes more effectively. At query time, lookup tables estimate distances from those codes. The result is approximate, so validate which neighbors it returns.

Memory math.

Count the actual codes and all supporting data. For example, 128 float32 values use 512 bytes. Sixteen 8-bit PQ codes use 16 bytes for the codes alone: a 32-fold reduction for that part, before codebooks, IDs, centroids and other index overhead.

Do not use the code-size ratio as a guarantee of total database memory savings.

Recall floor.

Test recall against exact nearest-neighbor results from the same dataset. Change the number of probed groups and compression settings, then compare both missed matches and query time. A small synthetic test does not establish a quality floor for your production data.

Measure your workload

There is no dataset-size or throughput guarantee in this guide. Capacity depends on vector dimensions, record metadata, index overhead, available resources and the workload. Measure a representative sample before planning a larger deployment. Start with IVF setup and quantization choices.

© 2026 Silicoyn Technologies Pvt Ltd

On this page