在MySql中合并位,枚举和设置字段 [英] Merging Bit, Enum and Set fields in MySql

查看:347
本文介绍了在MySql中合并位,枚举和设置字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道多达八个位字段合并为一个字节以节省空间,但如果我有几个位字段和一个枚举或一个设置字段怎么办?它们在内部合并吗?我问,因为我将在我的表中有很多行,我想尽可能避免开销。

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.

推荐答案

根据参考, code> SET 字段使用一个字节最小,所以这些出口为任何种类的合并。

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

更新: ENUM 也是:​​它们至少也需要一个字节。 参考

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

这篇关于在MySql中合并位,枚举和设置字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆