Hacker News new | ask | show | jobs
by rcoder 6242 days ago
Actually, the core CDB data structure only limits keys and values to 4GB each, not in total:

http://www.unixuser.org/~euske/doc/cdbinternals/index.html

The hash algorithm used also only produces a 32-bit key, meaning you'll be limited to 2^32 total records. Again, though, unless your data is of trivial size, that gives you considerably more room to work with than a hard 4GB limit.

Edit: doh! can't use double-asterisk for exponent on HN

1 comments

Then why does the Perl implementation (http://search.cpan.org/~msergeant/CDB_File-0.96/CDB_File.pm) warn of the error:

CDB database too large -- You attempted to create a cdb file larger than 4 gigabytes.

?

I believe rcoder is saying the 4GB database limit is a property of the implementation rather than the cdb format.