# pgvector

> pgvector is a Postgres extension for vector similarity search with HNSW/IVFFlat indexes, integrates seamlessly with SQL for hybrid queries. Perfect for existing Postgres users in RAG/KB apps; compares to dedicated VDBs by leveraging relational ACID. Features: exact KNN, distance ops.

- **URL:** https://github.com/pgvector/pgvector
- **Category:** Postgres Vector Extensions
- **Tags:** Postgres Extension, Sql Hybrid, Cost Optimized, Sql Native
- **Featured:** yes
- **Updated:** 2026-04-30 11:38
- **Canonical page:** https://vectordb.ever.works/items/pgvector

## Details

## Overview

pgvector brings efficient vector search to PostgreSQL using standard SQL, eliminating the need for separate vector databases.

## Features

- **Indexes**: HNSW (high recall, dynamic), IVFFlat (scalable IVF)
- **Operators**: <-> (L2), <#> (negative inner product), <=> (cosine)
- **Hybrid SQL**: Full PostgreSQL expressivity - WHERE, JOIN, GROUP BY with vectors
- **Optimizations**: Binary quantization (pgv_512), GPU accel (experimental)

## Use Cases

- **RAG in DB**: Embed/retrieve context alongside app data
- **Analytics**: Clustering, anomaly detection on embeddings
- **Search**: Semantic/hybrid in CRM, ecomm

## Comparisons

**vs Weaviate**: Native Postgres ACID/SQL vs GraphQL/REST; no sync latency, lower ops cost. Scales via pg_shard or Citus; dedicated DBs better for pure vector QPS extremes.

## Pricing

Free open-source (PostgreSQL License).

---

_This Markdown mirror is generated by Ever Works for AI agents. The canonical HTML page is at https://vectordb.ever.works/items/pgvector._
