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

[DocDB] Remove DocKey decoding part from ScanChoices #15304

Open
karan-yb opened this issue Dec 12, 2022 · 0 comments
Open

[DocDB] Remove DocKey decoding part from ScanChoices #15304

karan-yb opened this issue Dec 12, 2022 · 0 comments
Assignees
Labels
area/docdb YugabyteDB core features kind/bug This issue is a bug priority/medium Medium priority issue

Comments

@karan-yb
Copy link
Contributor

karan-yb commented Dec 12, 2022

Jira Link: DB-4457

Description

As part of the fix for #12899 and #14862, we figured that ScanChoices SkipTargetsUpTo can be optimized further by avoiding the decode for key columns which are not used in the filter. Based on the offline discussion, here is the proposal discussed in meeting:

  1. ScanChoices - introduce a new method which returns the filtered key column indexes.
    std::vector<size_t> GetFilteredKeyColumnIndexes()
  2. Iterator - decode the key before calling SkipTargetsUpTo and handle system keys as part of it. Update ScanChoices SkipTargetsUpTo to:
    Status SkipTargetsUpTo(Slice key_prefix, std::vector<KeyEntryValue or Slice>& key_columns_or_slice, Slice suffix)
  • where key_prefix is the part of the key which includes hash key and other metadata. It also includes the key columns which are not required by filter.
  • key_columns_or_slice - vector either includes a decoded KeyEntryValue for a filtered column or Slice for key column which is not required by ScanChoices
  • suffix includes all key columns which are not part of filter
@karan-yb karan-yb added area/docdb YugabyteDB core features status/awaiting-triage Issue awaiting triage labels Dec 12, 2022
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue and removed status/awaiting-triage Issue awaiting triage labels Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features kind/bug This issue is a bug priority/medium Medium priority issue
Projects
None yet
Development

No branches or pull requests

3 participants