What is the size of the BIT (1) memory?

I always thought the column storage size BIT(1)is 1 bit.

But http://dev.mysql.com/doc/refman/5.6/en/storage-requirements.html

states that it is approximately (1 + 7) / 8 bytes = 1 byte = 8 bits .

If I have 32,000 rows of data BIT(1), does that mean that 32,000 * (1 + 7) / 8 bytes = 32,000 bytes of memory are required?

+5
source share
2 answers

BIT (M) approximately (M + 7) / 8 bytes

http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html

-> data should be aligned so that mysql needs multiple bytes

+4
source

, . , , (, 4 32- ). 4- .

, 32- 32 4 , 33 8 .

+1

All Articles