Comments (3)
First, I'd recommend running with v0.6.2 (or v0.7.0) as v0.6.2 has changes that impact index build performance that will be noticeable in what you're testing.
The index build occurs in the portion of maintenance_work_mem
that's allocated -- at the point of the index build shared_buffers
is used for pages already persisted the disk (i.e. heap pages).
If the data used for building the index exceeds maintenance_work_mem
, the "excess" data is written to temporary storage, which is wherever you've defined where your PostgreSQL temporary storage goes.
Once the index is built, pgvector allocates the pages for flushing to disk and handles that portion in bulk. This is when the new index pages make their way into the shared buffer pool.
My hunch is that the second case makes more sense since there's a possibility to lose index if database restarts.
I'm not following this -- assuming this is the "builk build" scenario, if your database restarts while your index is still building, you have to start the index build again as the transaction never finished.
from pgvector.
Hi @taimur1991, someone could come up with a formula for estimating the index size based on the # of rows, # of dimensions, data type, index type, and index options (see #545 for the layout / storage of HNSW index tuples). You'd need to take into account the Postgres block size / page layout as well.
from pgvector.
Thanks @jkatz, that clears the concept. I'd really appreciate your comment on the size of index with more recent version of pgvector as I have gone through your study here with pgvector 0.5.0
. Your study shows that index size depends on the configuration of hnsw and type of dataset used. Similar analysis was concluded by this study as well although this study does not provide the pgvector version. Could it be possible to estimate the size of index from the table or from any relation? For instance, this answer shows the estimation of index memory with the help of a relation proposed by FAISS. Can similar relation be made for index size as well?
from pgvector.
Related Issues (20)
- how to list existing databases in postgresql using python HOT 2
- HNSW Indexing and Filtering HOT 2
- A question about building index in background. HOT 1
- Installation instructions unclear HOT 1
- Large vector data type will cause performance decline? HOT 1
- A question regard table_open() in background worker when building index HOT 3
- jVector Implementation
- Type Error when working with Langchain (Missing Positional Argument: evalue) HOT 1
- pgvector still use row-based storage instead of columnar storage ? HOT 1
- Can't get the query planner to use HNSW index HOT 3
- 【search failed】 2000w、768dim, data search failed HOT 1
- ERROR: index row size 6160 exceeds btree version 4 maximum 2704 for index HOT 3
- Make difficulties HOT 2
- Table Insert Performance with HNSW Index HOT 3
- Comparison with high-precision data HOT 2
- Weight in the filters HOT 5
- can't make pgvector HOT 1
- src\bitvec.c(43): warning C4141: 'dllexport': used more than once HOT 6
- Porting indexes from pinecone to pgvector HOT 1
- Error when creating a halfvec_ip_ops index HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgvector.