facebook / rocksdb

A library that provides an embeddable, persistent key-value store for fast storage.
http://rocksdb.org
GNU General Public License v2.0
28.67k stars 6.33k forks source link

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

Open pdillinger opened 1 year ago

pdillinger commented 1 year ago

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.

zaidoon1 commented 8 months ago

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