pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: xcu (@xcu) <noreply+xcu@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #642: Search with IVF and HNSW indexes
Date: Thu, 15 Aug 2024 15:24:09 +0000
Message-ID: <gh-pgvector-pgvector-642-c2291515916@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-642@github.com>
References: <gh-pgvector-pgvector-642@github.com>

@jkatz I'm managing a fairly big postgres instance with +50M embeddings and IVF index. I will likely have to switch to HNSW in the near future, but I want to do the switch without downtime.
To maintain performance I need to keep the full index in memory, and having both IVF and HNSW at the same time is not an option due to high costs (the host already has 350GB of RAM just with IVF).
Since the table with the vectors is partitioned I'd like to switch to the new HNSW partition by partition to avoid downtime, as bringing just one partition index to memory is very fast. Partitions have 100k vectors each, so loading the index in one of them takes very little time.

Initially I thought it would be great if I could just create the HNSW index without using it, then switch from IVF to HNSW for each partition. But if I cannot control when the switch from IVF to HNSW is done in memory perhaps I should do something like this for each partitioned table?
1- create hnsw index.
2- remove IVF index.
3- switch to new partition.

view thread (5+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-642-c2291515916@github.com>
Permalink:  ../gh-pgvector-pgvector-642-c2291515916@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox