Closed GoogleCodeExporter closed 9 years ago
Similarly, it'd be great if we could get the size of an entry, without also
fetching the value from disk.
Original comment by alexkarp...@gmail.com
on 15 Sep 2012 at 11:35
There is no way to implement Count more efficiently inside leveldb than outside.
"Delete range" could theoretically be implemented more efficiently inside
leveldb, but it would be very complicated or would interact badly with
snapshots. So it won't happen any time soon.
Original comment by san...@google.com
on 18 Sep 2012 at 5:18
If a fast count is important, you can keep track of the count as you write
entries, and write it out as it's own special entry.
# pseudo
if (!get(k)) {
put(k,v)
c=get("*cnt");
++c;
put("*cnt",v)
} else {
put(k,v)
}
Original comment by earone...@gmail.com
on 10 Jul 2014 at 6:44
Original issue reported on code.google.com by
saw...@gmail.com
on 4 Sep 2012 at 10:18