Sounds to me like you are either trying to re-invent the wheel, or you're running your database on an old 10MB hard drive.
I would just use 8 discrete fields, indexed, and "waste" those 7 extra bytes.


-Mark

Mike Boone wrote:

Hi all,

I was hoping to use a TINYINT to store 8 distinct boolean values. That works
fine, but is there any way to optimize searching on a specific bit? I didn't
see a way for MySQL to create an index on a specific bit of the TINYINT. Am
I better off "wasting" space by putting each boolean value in its own
TINYINT?

Thanks for the advice!
Mike Boone
http://boonedocks.net/mike






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to