Back to directory

pg_turboquant

A PostgreSQL extension that adds a compact approximate-nearest-neighbor index for pgvector's vector and halfvec types, built around PostgreSQL's own storage and executor.

pg_turboquant

pg_turboquant adds a custom access method, turboquant, to PostgreSQL for approximate nearest-neighbor search over vector and halfvec columns. Rather than treating ANN search as an external service, it works within PostgreSQL's own storage and executor: MVCC stays in the executor, exact reranking stays in SQL, and the index uses PostgreSQL's write-ahead log.

It combines a structured-transform payload for normalized cosine and inner-product retrieval with structure-of-arrays batch pages that pack 4-bit dimension-major values for zero-copy SIMD scoring, using NEON or AVX2 kernels with accumulation in int16. It supports flat and IVF-routed scans, bitmap filtering for predicate-heavy queries, and SQL-side exact reranking helpers, plus a reproducible benchmark harness with regression gates. L2 and non-normalized scans fall back to decoded-vector scoring rather than the faster quantized path.

It is written in C and distributed under the MIT license.

More in Databases

See all 294
  • SQLBraid

    clickin.github.io

    A SQL-first data-access toolkit for TypeScript that keeps ordinary SQL visible in tagged template literals, binds interpolated values safely by default, supports readable conditional SQL directives, and lets a schema validate the returned rows.

  • A SQL-style query language and toolchain for the Qdrant vector database, covering dense, sparse and hybrid search, filtering and multitenancy, with the same grammar running from a CLI, Python, Node.js, Rust, WebAssembly and an in-process edge engine.

  • Fast Knowledge

    github.com

    A self-hosted, Java-based knowledge base for small and mid-sized organizations, turning internal documents into a searchable, question-answerable and audit-exportable knowledge asset with hybrid retrieval and Docker deployment.