pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgvector/pgvector] issue #183: Question: Size on a vector column type
6+ messages / 4 participants
[nested] [flat]

* [pgvector/pgvector] issue #183: Question: Size on a vector column type
@ 2023-07-11 09:16 "LorneCurrie (@LorneCurrie)" <noreply+LorneCurrie@github.com>
  0 siblings, 0 replies; 6+ messages in thread

From: LorneCurrie (@LorneCurrie) @ 2023-07-11 09:16 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Hi there.

We are currently using a table that contains a Vector, set to 1536.  We need to now store a vector that is 700.  Is it possible to use the existing column that we have or do we need to create a new column for the smaller vector?



^ permalink  raw  [nested|flat] 6+ messages in thread

* Re: [pgvector/pgvector] issue #183: Question: Size on a vector column type
@ 2023-07-11 13:46 ` "jkatz (@jkatz)" <noreply+jkatz@github.com>
  4 siblings, 0 replies; 6+ messages in thread

From: jkatz (@jkatz) @ 2023-07-11 13:46 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@LorneCurrie You'll have to create a new column. The `vector` data type checks the dimensionality before allowing an insert/update.

If you need variable-width vectors within the same column, you can use the PostgreSQL-native array type (e.g. `real[]` for 4-byte floats), but you would not be able to use the indexing mechanisms that pgvector provides.

^ permalink  raw  [nested|flat] 6+ messages in thread

* Re: [pgvector/pgvector] issue #183: Question: Size on a vector column type
@ 2023-07-11 15:23 ` "ankane (@ankane)" <noreply+ankane@github.com>
  4 siblings, 0 replies; 6+ messages in thread

From: ankane (@ankane) @ 2023-07-11 15:23 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

You can also use `vector` for variable-dimension vectors (instead of `vector(1536)` or `vector(700)`), but won't be able to index it, so it's not recommended.

^ permalink  raw  [nested|flat] 6+ messages in thread

* Re: [pgvector/pgvector] issue #183: Question: Size on a vector column type
@ 2023-07-11 15:23 ` "ankane (@ankane)" <noreply+ankane@github.com>
  4 siblings, 0 replies; 6+ messages in thread

From: ankane (@ankane) @ 2023-07-11 15:23 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane closed this.

^ permalink  raw  [nested|flat] 6+ messages in thread

* Re: [pgvector/pgvector] issue #183: Question: Size on a vector column type
@ 2024-08-30 09:35 ` "vamen (@vamen)" <noreply+vamen@github.com>
  4 siblings, 0 replies; 6+ messages in thread

From: vamen (@vamen) @ 2024-08-30 09:35 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane  why cant we do conditional indexing ? using model id for condition ?

^ permalink  raw  [nested|flat] 6+ messages in thread

* Re: [pgvector/pgvector] issue #183: Question: Size on a vector column type
@ 2024-08-30 18:34 ` "jkatz (@jkatz)" <noreply+jkatz@github.com>
  4 siblings, 0 replies; 6+ messages in thread

From: jkatz (@jkatz) @ 2024-08-30 18:34 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@vamen You can do conditional indexing, but if you're trying to use the `vector` column as the condition, you'd need to partition for that to work.

^ permalink  raw  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2024-08-30 18:34 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-07-11 09:16 [pgvector/pgvector] issue #183: Question: Size on a vector column type "LorneCurrie (@LorneCurrie)" <noreply+LorneCurrie@github.com>
2023-07-11 13:46 ` "jkatz (@jkatz)" <noreply+jkatz@github.com>
2023-07-11 15:23 ` "ankane (@ankane)" <noreply+ankane@github.com>
2023-07-11 15:23 ` "ankane (@ankane)" <noreply+ankane@github.com>
2024-08-30 09:35 ` "vamen (@vamen)" <noreply+vamen@github.com>
2024-08-30 18:34 ` "jkatz (@jkatz)" <noreply+jkatz@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