Skip to content

Downcast _SEQUENCE_NUMBER and _VALUE_KIND once per batch in sort merge #1192

Closed

Description

@JeonDaehong

Search before asking

  • I searched in the issues and found nothing similar.

Description

SortMergeCursor::sequence_number and value_kind look up and downcast _SEQUENCE_NUMBER and _VALUE_KIND from the batch for every row the merge emits. The column and its type don't change within a batch, so this can be done once when the cursor is created.

Measured on one instance, alternating main and the change over 8 rounds with 2M keys × 3 overlapping rounds:

read main (median) change (median)
PK merge 445–455 ms 414–427 ms
PK DV merge-on-read 446–451 ms 412–427 ms

The ranges don't overlap.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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