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

fix: Optimize ledger_range query #1797

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

godexsoft
Copy link
Collaborator

There is a primary key on this table, is_latest. So there can be 0, 1, or 2 rows in this table.
Adding the inlist on the primary key, scylla will hash the partition key (which is the primary key - is_latest), and only go to token ranges that match. This should be much faster than the current version.

@godexsoft
Copy link
Collaborator Author

At the very least this does not break our DB tests and i have been told that this should be a lot faster than what we had.

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.45%. Comparing base (c4b87d2) to head (29248df).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1797   +/-   ##
========================================
  Coverage    71.45%   71.45%           
========================================
  Files          314      314           
  Lines        13055    13055           
  Branches      6665     6665           
========================================
  Hits          9329     9329           
  Misses        1960     1960           
  Partials      1766     1766           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

cindyyan317
cindyyan317 previously approved these changes Dec 23, 2024
Copy link
Collaborator

@cindyyan317 cindyyan317 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@cindyyan317 cindyyan317 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

2 participants