From ff3bffd9a8500b6aabbac598ae8e2841d4094a3b Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 29 Nov 2023 22:09:09 -0800 Subject: [PATCH] Moved FAQ [skip ci] --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 4898cf1..87b59f6 100644 --- a/README.md +++ b/README.md @@ -414,14 +414,6 @@ Yes, pgvector uses the write-ahead log (WAL), which allows for replication and p You’ll need to use [dimensionality reduction](https://en.wikipedia.org/wiki/Dimensionality_reduction) at the moment. -#### Do indexes need to fit into memory? - -No, but as with other index types, you’ll likely see better performance if they do. You can get the size of an index with: - -```sql -SELECT pg_size_pretty(pg_relation_size('index_name')); -``` - #### Can I store vectors with different dimensions in the same column? You can use `vector` as the type (instead of `vector(3)`). @@ -471,6 +463,14 @@ and query with: SELECT * FROM items ORDER BY embedding::vector(3) <-> '[3,1,2]' LIMIT 5; ``` +#### Do indexes need to fit into memory? + +No, but like other index types, you’ll likely see better performance if they do. You can get the size of an index with: + +```sql +SELECT pg_size_pretty(pg_relation_size('index_name')); +``` + ## Troubleshooting #### Why isn’t a query using an index?