Vector
A blazing fast and memory efficient vector search extension for SQLite
SQLite-Vector
SQLite-Vector is a cross-platform, ultra-efficient SQLite extension that brings vector search capabilities directly into your embedded database Whether you're dealing with millions of high-dimensional vectors or operating on resource-constrained edge devices, SQLite-Vector delivers lightning-fast performance with a tiny memory footprint.
Built for Speed, Engineered for Scale
Optimized C implementation with SIMD acceleration
AVX2, SSE2, Neon and more
No preindexing required
Start searching instantly, without waiting hours for indexing
Massive datasets. Minimal memory.
Just 30MB by default
No external servers or virtual tables
Guaranteed zero-latency at the Edge
Real-time performance
Query millions of vectors in milliseconds
No Virtual Tables or complex JOINs
Embed everything in a regular SQLite table
Works everywhere
Prebuilt binaries for iOS, Android, macOS, Windows, Linux, and WASM
-- Create a standard SQLite table
CREATE TABLE embeddings (
id INTEGER PRIMARY KEY,
vector BLOB, -- store Float32/UInt8/etc.
label TEXT
);
-- Insert a vector
INSERT INTO embeddings (vector, label)
VALUES (vector_convert_f32('[0.1, 0.2, 0.3, ..., 0.384]'), 'sample');
-- Initialize the vector search (e.g., Float32 with 384 dimensions)
SELECT vector_init('embeddings', 'vector', 'type=FLOAT32,dimension=384');
-- (Optional) Quantize and preload for even faster search
SELECT vector_quantize('embeddings', 'vector');
SELECT vector_quantize_preload('embeddings', 'vector');
-- Run a nearest-neighbor search (top 10)
SELECT e.id, v.distance
FROM embeddings AS e
JOIN vector_quantize_scan('embeddings', 'vector', ?, 10) AS v
ON e.id = v.rowid;