Discussion:
[leveldb] more key or longer value
y***@gmail.com
2016-08-03 09:53:44 UTC
Permalink
hello

i have some datas need saved by leveldb, i don't know how long about key
and value's length have efficiency if leveldb, now i key length=8byte,
value length about 1m, if key=9byte,value length about 300k is better?
do you have a good advice about key and value length radio?
--
You received this message because you are subscribed to the Google Groups "leveldb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leveldb+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Robert Escriva
2016-08-03 15:20:42 UTC
Permalink
There's a maximum size of an SSTable (was 2MB last I looked). The
larger your keys, the fewer fit in a table, and the more the lookup will
depend upon in memory structures. A value length of about 1M means
you'll have just two kv pairs per sstable.

Ultimately you'll need to benchmark your data set as the performance
will depend upon the number of items (and thus the size of the in-memory
data structures).

-Robert
hello
   
   i have some datas need saved by leveldb, i don't know how long about key and
value's length have efficiency if leveldb, now i key length=8byte, value length
about 1m, if key=9byte,value length about 300k is better?
   do you have a good advice about key and value length radio?
--
You received this message because you are subscribed to the Google Groups "leveldb" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "leveldb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leveldb+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...