On 26 Mar 2002, at 15:23, Tino Didriksen wrote:

> I have a column that is VARCHAR(32). I use it to store MD5 hash values. MD5
> hashes are always 32 byte.  In other words, that's 1 byte wasted because 
> it's VARCHAR. 
> 
> With 2500 entries and more on the way, that's at least 2500 byte wasted.
> 
> Is there no way to enforce a column type around the silent changes?

It's a reasonable question, but if you're so worried about space that 
2500 bytes is important, why aren't you packing the MD5 values into a 
binary format and avoiding the waste of 16 bytes per record that's 
required to store them as strings of 0-9A-F?

[Filter fodder: SQL, query]

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Washington, DC

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to