Click any tag below to further narrow down your results
Links
pg_vectorsearch is an alpha PostgreSQL extension that indexes vectors using PRISM, a hierarchical partitioning method with quantization. It outperforms pgvector's IVFFlat and HNSW indexes on speed and recall, even while using a quarter of the memory on 100-million-vector datasets.
- PRISM uses a hierarchical centroid tree, RaBitQ quantization with error bounds, and SIMD-optimized distance computation to achieve faster queries and index builds than existing PostgreSQL vector indexes.
- Works with both native vec32/vec16 column types and existing pgvector vector/halfvec columns without requiring table rewrites or query changes.
- Supports dynamic updates (inserts, updates, deletes) with a prism_rebalance procedure to split oversized posting lists, and requires PostgreSQL 18+ with a C11 compiler.
A developer measured five common SQL patterns that force PostgreSQL to do unnecessary work—UNION instead of UNION ALL, MATERIALIZED CTEs, ORDER BY random(), SELECT * instead of specific columns, and unindexed expressions—and found gaps ranging from 20x to 4,000x slower on a 2 million row table.
- UNION deduplicated 2 million rows unnecessarily (13.6s) versus UNION ALL (0.68s) when the developer knew the halves couldn't overlap
- MATERIALIZED keyword forced PostgreSQL to build the entire CTE before filtering, turning a 0.24ms query into 1,973ms
- ORDER BY random() LIMIT 1 sorted all 2 million rows to get one (1,313ms); TABLESAMPLE SYSTEM did it in 0.3ms, though with different guarantees
- SELECT * required visiting the table for every row (1,718 buffers, 64.8ms) versus querying just the indexed column (279 buffers, 32.8ms)
I can see the URL and structure, but the actual article content wasn't provided — I'm only seeing Medium's navigation elements (sitemap, app link, etc.).
To give you an accurate title, summary, key