From Text to Meaning: pgvector Transforms PostgreSQL Search
summary
pgvector adds native vector storage, distance operators and indexes to PostgreSQL so you can run semantic search and recommendations without a separate vector DB. It supports half-precision (float16) to cut storage roughly in half, distance metrics like Euclidean cosine dot product, and index types IVF_flat and HNSW. Exact KNN gives 100% recall but does full scans; ANN trades recall for speed. Practical rules mentioned: for IVF_flat lists use N/1,000 if <1M vectors, sqrt(N) if >1M. Demo code and slides are posted.
AI-written summary · about
chapters (14)
- 0:00Generative AI and pgvector
- 2:31Vector space and embeddings
- 10:59Vector embeddings and natural language processing
- 16:15PostgreSQL needs pgvector
- 19:06PostgreSQL for vector searches
- 23:48pgvector extension features
- 25:58K nearest neighbor search
- 27:47Approximate nearest neighbor
- 35:12IVF flat indexing
- 41:12Recall and performance trade-offs
- 42:37HNSW indexing deep dive
- 45:08Distance methods for search
- 47:43Performance and index selection
- 48:03Q&A
related talks
41mPostgreSQL for AI. Real Vector Search in PostgreSQL
52mVector search is now boring, but PostgreSQL has ways to go
44mScaling Semantic Search in PostgreSQL
04mSupercharging GenAI PostgreSQL Vector Search Optimization
53mVectors: how to better support a nasty data type in PostgreSQL
48mVectors are the new JSON
25mVector data in Postgres - how's it different from "normal" data?
54mDissimilarity search...
