
Vector database
Open sourcepgvector for businesses
pgvector is an open-source extension for the PostgreSQL database that can be used to store vectors and search for similarity. We use pgvector when PostgreSQL is in use anyway and an AI search should be able to do without an additional database.
- Licence
- PostgreSQL License
- Operation
- Self-hosted in Germany or at your premises
- Official website
- github.com/pgvector/pgvector
What we use pgvector for
AI search without additional service
Vectors reside in the same database as the rest of the application data.
Small and medium-sized knowledge bases
For manageable document volumes with simple filters.
Linking to specialist data
Vector search and normal SQL queries can be combined in one query.
Prototypes
Quickly test whether an AI search works for a space.
Why pgvector?
Proven basis
PostgreSQL is one of the most common databases; operation, backups and rights are known.
Permissive license
pgvector is licensed under the PostgreSQL License.
One less system
No additional service that needs to be operated and secured.
Flexible indices
HNSW for fast search, IVFFlat for more economical search; exact search without index.
What we take care of with pgvector
- Decide pgvector or Qdrant based on your data volume and filters
- Setup, Index, and Data Model
- Importing and updating the documents
- Matching search with real questions
Implementation and consulting can often be subsidised through German BAFA or INQA funding.
What it is not meant for
For proximity indexes, pgvector filters for the index scan; strict filters, such as permissions, can then lead to few hits. Hybrid search of meaning and keyword is not built-in. For large collections with many filters, we therefore tend to use Qdrant.
Frequently asked questions about pgvector
What is pgvector?
+−
An open-source extension for PostgreSQL that stores vectors and enables similarity search via SQL – the basis for AI searches without their own vector database.
Is pgvector free?
+−
Yes, pgvector is licensed under the PostgreSQL License. Costs are only incurred for operation and setup.
When pgvector, when Qdrant?
+−
pgvector if PostgreSQL is already running and the amount of data is manageable. Qdrant for large inventories, many filters and desired hybrid search.
What indexes does pgvector support?
+−
HNSW for good speed with high hit quality and IVFFlat for faster setup with less memory. Without index, pgvector searches exactly.
Works together with
Product names and logos mentioned are trademarks of their respective owners. bettersorted uses this software and operates it for clients; there is no official partnership.
A 30-minute conversation, free of charge.
A 30-minute consultation, free of charge. We’ll take a look at your processes and give you our honest opinion on whether automation is worthwhile.