I don't understand why DATETIME takes 8 bytes. It's just a waste, since DATE+TIME take 6 bytes. And in fact, while DATE and TIME are each rounded up to bytes on its own, a combined DATETIME should only take 5 bytes:
14 bits for year 04 bits for month 05 bits for day 05 bits for hour 06 bits for minutes 06 bits for seconds --- 40 bits
datetime is "displayed" as YYYY-MM-DD HH:MM:SS - it is *not* stored that way. It is stored as a *nix timestamp - an integer number of seconds since 1970-01-01 00:00:00. A 4-byte integer field has historically been used on *nix systems for this purpose, but this has an upper limit of 2038. A larger *nix timestamp is now used to avoid the equivalent of Y2K in 2038. The 8-byte *nix timestamp accommodates micro-seconds.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
