pgvector vs sqlite-vec
pgvector: The standard Postgres extension for vector similarity search with HNSW and IVFFlat indexes. sqlite-vec: Dependency-free SQLite extension for vector search that runs anywhere SQLite does, including WASM.
key differences
- pgvector is built for larger datasets (≤ 10 TB) than sqlite-vec (≤ 100 GB).
- Horizontal scaling is addon in pgvector and none in sqlite-vec.
- Only pgvector has change data capture, stored procedures, materialized views, pub/sub, compression.
- Only sqlite-vec has in-memory, runs in webassembly.
- sqlite-vec can run embedded in your application process.
choose pgvector for
- +Adding semantic search to an existing Postgres app
- +RAG with permission filtering via SQL joins
- +Recommendations next to product data
- +Deduplication and similarity lookups
best at · Vector search, RAG, OLTP
choose sqlite-vec for
- +On-device RAG in desktop and mobile apps
- +Local-first semantic search
- +Browser-based vector search via WASM
- +Small server apps already on SQLite or libSQL
best at · Vector search, RAG, Embedded
pgvector vs sqlite-vec: FAQ
What is the difference between pgvector and sqlite-vec?
pgvector: The standard Postgres extension for vector similarity search with HNSW and IVFFlat indexes. sqlite-vec: Dependency-free SQLite extension for vector search that runs anywhere SQLite does, including WASM. pgvector is built for larger datasets (≤ 10 TB) than sqlite-vec (≤ 100 GB). Horizontal scaling is addon in pgvector and none in sqlite-vec. Only pgvector has change data capture, stored procedures, materialized views, pub/sub, compression.
When should I choose pgvector over sqlite-vec?
Choose pgvector for adding semantic search to an existing Postgres app, RAG with permission filtering via SQL joins and recommendations next to product data. Choose sqlite-vec for on-device RAG in desktop and mobile apps; local-first semantic search; and browser-based vector search via WASM.
Is pgvector or sqlite-vec more popular?
pgvector ranks #44 on the WhichDB Score (40.0/100) and sqlite-vec ranks #81 (31.1/100). Popularity is not fit: check the requirements that matter for your project.
Are pgvector and sqlite-vec open source?
Yes. pgvector is open source. License: PostgreSQL License. Yes. sqlite-vec is open source. License: MIT or Apache-2.0 (dual).