georgia-tech-db / pgvector-remote

Other
25 stars 5 forks source link

Add optimization for flushing zero vectors to pinecone #15

Open swetavooda opened 6 months ago

swetavooda commented 6 months ago

Issue with old approach

  1. Validating large vectors to verify if they are zero-vectors would slow down insertion.
  2. Validating every vector on insert + flushing + build would be redundant and slows down the insertion
  3. The old approach throws an error to the user which blocks the user from inserting the remaining vectors in the buffer if a zero-vector is encountered. Which is a bad experience for the users which requires manual effort to remove the zero-vectors

Solution:

  1. Validate only on flushing + build time.
  2. Do not block user with error. Continue to flush remaining tuples in buffer and display a WARNING.