Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

205

积分

19

好友

29

主题
发表于 2016-6-25 19:21:23 | 查看: 2263| 回复: 0
【dbdao.com MySQL OCP认证专题】- MySQL 5.6 - OCP 考题讲解

4.

When designing an InnoDB table, identify an advantage of using the BIT datatype Instead of one of the integer datatypes.
A.
BIT columns are written by InnoDB at the head of the row, meaning they are always the first to be retrieved.
B.
Multiple BIT columns pack tightly into a row, using less space.
C.
BIT(8) takes less space than eight TINYINT fields.
D.
The BIT columns can be manipulated with the bitwise operators &, |, ~, ^, <<, and >>. The other integer types cannot.
------------------------------------------------

答案:C

分析:
关于数据类型的存储,可查看http://dev.mysql.com/doc/refman/5.7/en/storage-requirements.html
A, B都没有特别在guide中提到。
BIT(8)大致长度为1个Byte, 8个tinyint的存储长度相当于一个bigint了, 请注意并不是说tinyint(8),括号中为可显示的长度,由于一个tinyint为1个Byte,因此8个自然要更长。因此C正确。
D错,int类型值夜可以进行bit操作符的操作
dbdao_mysql_item_id650_wm_45b6eebe82de3197bbdd83198cc3008caf5e067b.png


参考:
关于数据类型的存储,可查看http://dev.mysql.com/doc/refman/5.7/en/storage-requirements.html
您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-4-18 12:19 , Processed in 0.057437 second(s), 25 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569