Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: max dimensions / page size #31

Closed
LazyDBA247-Anyvision opened this issue Aug 7, 2022 · 5 comments
Closed

Q: max dimensions / page size #31

LazyDBA247-Anyvision opened this issue Aug 7, 2022 · 5 comments

Comments

@LazyDBA247-Anyvision
Copy link

Hi,
if PG page size 8192 (8KB), and
"Each vector takes 4 * dimensions + 8 bytes of storage"
why the limit is 1024? it looks like it can be bigger (considering other columns in the same table)

can I just increase it to 1080 in src/vector.h?
Without having PG compiled with 16KB page?

10x!

@ankane
Copy link
Member

ankane commented Aug 7, 2022

Hey @LazyDBA247-Anyvision, 1024 is the highest power of two that'll fit on a single page with the default size. You should be able to increase it to any number that fits on a single page.

@ankane ankane closed this as completed Aug 7, 2022
@ankane
Copy link
Member

ankane commented Jan 11, 2023

Hey @LazyDBA247-Anyvision, just fyi, version 0.4.0 supports up to 16000 dimensions for vectors and 2000 dimensions for indexes by default.

@LazyDBA247-Anyvision
Copy link
Author

great, 10x for the update.

so need to remove the FAQ:
https://github.com/pgvector/pgvector#what-if-i-want-to-index-vectors-with-more-than-2000-dimensions

@ankane
Copy link
Member

ankane commented Jan 12, 2023

That one's still relevant (just updated it before the release).

@LazyDBA247-Anyvision
Copy link
Author

ha ha, i didn't even read it fully 🥺 i just remembered that FAQ

good job! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants