erthink / libmdbx

One of the fastest embeddable key-value ACID database without WAL. libmdbx surpasses the legendary LMDB in terms of reliability, features and performance.
https://erthink.github.io/libmdbx/
Other
1.16k stars 111 forks source link

add MDBX_KEYFIXED like MDBX_INTEGERKEY / MDBX_DUPFIXED #244

Closed gcxfd closed 3 years ago

gcxfd commented 3 years ago

I want use mdbx store ( public-key - ipv4-addr-port ) and (ipv4-addr-port - public-key), the key is always 32 bytes , the ipv4-addr-port is always 6 bytes maybe add support something like MDBX_KEYFIXED just as MDBX_INTEGERKEY / MDBX_DUPFIXED will save space

erthink commented 3 years ago

Such feature (i.e. the fixed key size) couldn't be implemented for libmdbx, since required change the database format which is frozen few years ago.

On the other hand, this is not a problem because the fixed key size feature only reduces overhead, but does not interfere with any use cases.

gcxfd commented 3 years ago

thanks for reply

maybe can support this when MithrilDB release ^_^