Merging Bit, Enum and Set fields in MySql

2019-09-06 09:25发布

I know up to eight Bit fields are merged into one byte to save space, but what if I have a couple of Bit fields and an Enum or a Set field? Are they internally merged too? I'm asking because I'm going to have a lot of rows in my table and I want to avoid overhead as much as possible.

1条回答
Lonely孤独者°
2楼-- · 2019-09-06 10:12

According to the reference, SET fields use one byte minimum so those are out for any kind of merging.

Update: ENUM is out, too: They take at least one byte as well. Reference

查看更多
登录 后发表回答