LWN.net Logo

Berkeley DB 4.5 available

Berkeley DB 4.5 available

Posted Sep 27, 2006 20:26 UTC (Wed) by dark (✭ supporter ✭, #8483)
In reply to: Berkeley DB 4.5 available by yodermk
Parent article: Berkeley DB 4.5 available

I don't see why it would be inefficient. Most numbers in databases are pretty small, so they don't take much space even compared to a binary representation, and I bet there are wins from treating all data types uniformly.

I'll start caring about it after I start caring whether my numbers are "int" or "smallint" in mysql :)


(Log in to post comments)

Berkeley DB 4.5 available

Posted Sep 28, 2006 9:26 UTC (Thu) by hawk (subscriber, #3195) [Link]

It's obvious that if it does indeed store numbers as their string representation, that certainly is a big waste of space.

For instance, which is better use of 4 bytes, to be able to store numbers 0-9999 or 0-4294967295 (if we take unsigned integers as our example)?

(Or if you want really small numbers as your example, with one byte you get 0-9 vs 0-255.)

You do however have a point, but what I'd say is not that it's efficient, but rather that for many uses it may not matter that much that it's awfully inefficient.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds