pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: bantmen (@bantmen) <noreply+bantmen@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #661: IVFFLAT QPS too low
Date: Tue, 27 Aug 2024 02:14:32 +0000
Message-ID: <gh-pgvector-pgvector-661-c2311435495@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-661@github.com>
References: <gh-pgvector-pgvector-661@github.com>

> Assuming you've performed your index build and haven't added any data to the index since

@jkatz That's correct. Given the colocation, I would expect much better IO throughput. I am checking in with AWS to understand if some configuration is throttling my IOPS.

My queries are like this:
``` sql
SELECT table.metadata1, table.metadata2, table.embedding <=> CAST({INLINED_LIST} AS vector(1200)) AS distance 
FROM table ORDER BY distance
LIMIT 800;
```

I am inlining the list in the query which is resulting in 24 kb queries. I am assuming that would not cause other strange issues? 

I am using the vectors only for the distance operation but I am reading other auxiliary columns which are of negligible size in comparison. Are the metadata columns also being stored in the index? If not, that would also result in reads directly to table which is not in the buffer (i.e. always a cache miss).

Here is what the cache residency looks like:


Table Name | Buffers | MB in Cache
-- | -- | --
table_index | 5,437,137 | 42,477
toast_table | 22,000 | 171
toast_table_index | 2,187 | 17
table | 1,641 | 12

Almost none of the TOAST'd data is in the buffer as almost all of the space is used for the index. Does the access pattern of pgvector replace the above breakdown? I have been running queries so this is not a "cold" start. The toast table is 93 gb.

Thank you for the recommendation. I'll run that by the team.









view thread (22+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-661-c2311435495@github.com>
Permalink:  ../gh-pgvector-pgvector-661-c2311435495@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