Ordinary tables
Store Float32, Float16, BFloat16, Int8, UInt8, and 1-bit vectors directly as BLOB columns.
Vector search
Store embeddings as BLOBs, avoid external vector servers, and run similarity search where your application already keeps data.
SQLite-Vector
SQLite-native extension
Best for
Vector search
Repository
GitHubProject
SQLite-Vector is a cross-platform SQLite extension for vector search in embedded databases. Vectors live in ordinary SQLite tables as BLOBs instead of special virtual tables.
It supports multiple vector formats, optimized distance functions, quantization, and a default low-memory profile for edge AI applications.
Why it matters
Capabilities
Store Float32, Float16, BFloat16, Int8, UInt8, and 1-bit vectors directly as BLOB columns.
Optimized C distance functions use platform acceleration where available.
Designed for embedded workloads, with a 30MB default memory profile.
Start searching without long preprocessing or external index-building pipelines.
Quantize and preload vectors for faster nearest-neighbor search.
Use native binaries, WASM, Swift, Android, or Python packages depending on the target.
Sample code
Keep vectors in a standard table, initialize the column, and query nearest neighbors in SQL.
-- Load SQLite-Vector
.load ./vector
CREATE TABLE images (
id INTEGER PRIMARY KEY,
embedding BLOB,
label TEXT
);
INSERT INTO images (embedding, label)
VALUES (vector_as_f32('[0.3, 1.0, 0.9, 3.2]'), 'dog');
SELECT vector_init('images', 'embedding', 'type=FLOAT32,dimension=384');
SELECT vector_quantize('images', 'embedding');
SELECT vector_quantize_preload('images', 'embedding');
SELECT e.id, v.distance
FROM images AS e
JOIN vector_quantize_scan('images', 'embedding', ?, 20) AS v
ON e.id = v.rowid;