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

Faster filtered scroll #1003

Merged
merged 3 commits into from
Sep 12, 2022
Merged

Faster filtered scroll #1003

merged 3 commits into from
Sep 12, 2022

Conversation

generall
Copy link
Member

All Submissions:

  • old scroll implementation did a full scan, if the filter had low cardinality, which resulted in very high latency of the scroll query
  • proposed implementation works similar to query planner, it estimates the cardinality of the filter first and then decides if it makes sense to use index first or filter the ids.
  • This implementation resolves the case, where user wants to select some records from DB using the secondary index.

Our of scope:

current boundary threshold is hard-coded and naive. It would require additional telemetry data to decide how to adjust it.

Issue detected in demo by @joein

lib/segment/src/segment.rs Outdated Show resolved Hide resolved
@generall generall merged commit ba26e2f into master Sep 12, 2022
@generall generall deleted the faster-filtered-scroll branch September 23, 2022 08:18
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.

None yet

3 participants