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

Add fast path for btree pages that fully satisfy query #3312

Open
westonpace opened this issue Dec 27, 2024 · 0 comments
Open

Add fast path for btree pages that fully satisfy query #3312

westonpace opened this issue Dec 27, 2024 · 0 comments

Comments

@westonpace
Copy link
Contributor

Currently we use the min/max of pages to determine which pages we need to search. Then we load those pages and search them with a flat search. Previously this was dominated by I/O time. Now that we are caching btree pages this flat search time could be a considerably part of the query.

We can speed this up by adding a fast path for pages that are obviously completely satisfied. For example, if the page has min=7 and max=11 and the query is foo BETWEEN 0 AND 20 then we know the page is completely matched and we can skip the flat search and just add all the row ids.

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

No branches or pull requests

1 participant