bloom filter for avoiding disk reads for missing keys?

59 views
Skip to first unread message

Dan Rodney

unread,
May 25, 2016, 11:28:11 AM5/25/16
to leveldb
We are considering using LevelDb to store a set of strings (where the values are all single byte dummy entries); we will call Get to find out whether a given string is in the set.

We expect that most of the time, the keys we're passing won't actually match anything in the set; we'd like to minimize the chances of reading from disk in those cases if possible.

It seems like the Bloom filter support built into LevelDb may help with this, but it wasn't entirely clear from the documentation, which instead talks about a single call to Get causing multiple disk reads without it. Our assumption is that given that our values are only one byte long, that wouldn't happen... we just want to avoid doing any disk seeks for keys that aren't there. Will the bloom filter support in LevelDb help with that?

Thanks,

Dan Rodney
Reply all
Reply to author
Forward
0 new messages