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

Feature Request: Support for pgvector in YugabyteDB #17960

Closed
1 task done
fire opened this issue Jun 27, 2023 · 1 comment
Closed
1 task done

Feature Request: Support for pgvector in YugabyteDB #17960

fire opened this issue Jun 27, 2023 · 1 comment
Labels
duplicate kind/new-feature This is a request for a completely new feature

Comments

@fire
Copy link

fire commented Jun 27, 2023

Description

pgvector is a PostgreSQL extension that provides efficient storage and operations for vector data. It's particularly useful for machine learning applications, where high-dimensional vectors are common.

Benefits

  1. Efficient Storage: pgvector stores vectors as binary data, which is more space-efficient than storing them as arrays.
  2. Fast Operations: pgvector supports various vector operations like dot product, cosine similarity, etc., which can be executed much faster than equivalent operations on arrays.
  3. Machine Learning Applications: With the rise of AI and ML, support for pgvector would make YugabyteDB an attractive option for developers in these fields.

Proposed Changes

  • Add support for pgvector data type
  • Implement functions for common vector operations.
  • Ensure compatibility with existing PostgreSQL pgvector functions.
-- Example from the pgvector github
CREATE EXTENSION vector;
-- Create a vector column with 3 dimensions
CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3));
-- Insert vectors
INSERT INTO items (embedding) VALUES ('[1,2,3]'), ('[4,5,6]');
-- Get the nearest neighbors by L2 distance
SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 5;

The above SQL commands should work seamlessly in YugabyteDB after implementing this feature.

Conclusion

Supporting pgvector would significantly enhance YugabyteDB's capabilities, especially for AI/ML applications. This feature would make YugabyteDB a more versatile and powerful database solution.

This feature request was assisted by AI/ML technologies.

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@fire fire added the kind/new-feature This is a request for a completely new feature label Jun 27, 2023
@fire
Copy link
Author

fire commented Jun 27, 2023

Duplicate of #16166

@jasonyb jasonyb closed this as not planned Won't fix, can't repro, duplicate, stale Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate kind/new-feature This is a request for a completely new feature
Projects
None yet
Development

No branches or pull requests

2 participants