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

Feature request: Get all key-values in a range (DB::MultiGetRange?) #11644

Open
pdillinger opened this issue Jul 26, 2023 · 1 comment
Open

Comments

@pdillinger
Copy link
Contributor

Iterators are commonly used with prior known bounds, and even if those bounds are specified to the iterator, there are potential optimizations RocksDB can do in a batch "fetch all key-values in this range" vs. a bounded iterator.

  • The assumption that the entire range will be read is potentially stronger. (There would likely be limit options on number of keys and value size, but common case would assume everything is read.)
  • We don't have to track complex iteration state in heap objects.
  • Might be more efficient to scan level by level (at least if we are allowed to return an arbitrary subset when a limit is reached, not promising the keys ordered first as an iterator would return)
@zaidoon1
Copy link
Contributor

zaidoon1 commented Mar 18, 2024

I'm also interested in this feature, specifically, I would like to check if there exists a key that matches a prefix without having to seek, so this part

(at least if we are allowed to return an arbitrary subset when a limit is reached, not promising the keys ordered first as an iterator would return

would be really important for me

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

No branches or pull requests

3 participants