Skip to content

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

@nicktobey

Description

@nicktobey

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions