Quote:> 1. Is reading/writing to a bit in a bit field 'much' slower than
> reading/writing to a byte?
The performance impact of bit fields is minimal. Although, I don't think
they can be indexed. Even if they could be indexed, their low cardinality
would make them practically useless.
Quote:> 2. 6 bit fields will be in one table. The docs say they will be stored
> in 1 byte. If you select the 6 bit fields in one select, is the byte
> retrieved once and the bit values extracted into the return value of the
> select? Would this be faster than getting the 6 bit values from
> individual byte fields?
If a table has multiple bit fields, they are packed into bytes to save
storage. This is their main advantage.
I discourage the use of bit fields. I use the smallint data type. Bit fields
are not compatible with some front end languages and the field domains tend
to evolve beyond two values. Upgrading from bit to another numeric data type
is a pain I try to avoid.
Later,
Brian*