From 36970438982233d78b18a20299fae746e0b967a9 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 31 Jan 2024 14:35:27 -0800 Subject: [PATCH] Added note about vacuuming - closes #450 [skip ci] --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 9aecf0d..a7456db 100644 --- a/README.md +++ b/README.md @@ -430,6 +430,15 @@ To speed up queries with an IVFFlat index, increase the number of inverted lists CREATE INDEX ON items USING ivfflat (embedding vector_l2_ops) WITH (lists = 1000); ``` +## Vacuuming + +Vacuuming can take a while for HNSW indexes. Speed it up by reindexing first. + +```sql +REINDEX INDEX CONCURRENTLY index_name; +VACUUM table_name; +``` + ## Languages Use pgvector from any language with a Postgres client. You can even generate and store vectors in one language and query them in another.