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

In-memory tables can't verify the uniqueness of a virtual generated column #2643

Open
nicktobey opened this issue Aug 27, 2024 · 0 comments
Open

Comments

@nicktobey
Copy link
Contributor

Secondary indexes on in-memory tables are currently not very efficient: they're stored as a sorted list of rows, and don't get re-sorted until the end of a batch table edit operation.

This makes detecting duplicate values in a unique virtual column slow and nontrivial.

In order to do this, we would need to either:

  • Scan every row of the table for each insert operation, computing the virtual column for each row.
  • Use a data structure for indexes that can be updated in place

I added disabled tests for this in #2641

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

No branches or pull requests

1 participant