Web Dev//SQL//vector extension
The concept of adding vector storage and cosine similarity search capabilities to an existing relational database. Instead of using a dedicated vector database, you extend your SQL database to handle embeddings.
The concept of adding vector storage and cosine similarity search capabilities to an existing relational database. Instead of using a dedicated vector database, you extend your SQL database to handle embeddings.
Adds a vector column type: stores arrays of floats (embeddings) as first-class data alongside normal columns
Adds distance functions: cosine similarity, Euclidean distance, inner product — usable directly in SQL queries
Adds specialized indexes: HNSW, IVF — for approximate nearest neighbor search without scanning every row
The main advantage: relational queries AND vector search in the same database, the same query. No syncing IDs between two systems.
pgvector is the most popular implementation (for PostgreSQL). Vectorize is Cloudflare's approach but as a standalone service, not a DB extension.
The tradeoff vs dedicated vector DBs (Pinecone, Weaviate): extensions can't match the raw speed and scale for millions of embeddings, but they keep everything in one place — one query, one system, one source of truth.