Search code examples
mysqlbit-fields

Bitmap with >= 100 bits in MySQL


I need a bitmap in MySQL with 100 bits resolution, but MySQLs biggest Integer type, BIGINT, has 64 bit. I want to perform bitwise and and or on it.

A Set is also not an option, since a maximum of 64 values is allowed (I guess it's implemented using BIGINT internally too).

The only option I see right now is splitting the BitField into 2 values.


Solution

  • I went with splitting my bitfield into multiple columns, works, although it's not a very nice solution - but since the length of the bitfields is hard coded it's no drama at all.