12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
ADADADADAD
mysql数据库 时间:2024-12-03 12:14:56
作者:文/会员上传
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
innodb 目前支持两种文件格式(innodb_file_format) Antelope 和Barracuda5.6 默认的是 Antelope (羚羊) ,有两种“数据表格式”(row_format):Redundant(冗余)、Compact(紧凑)5.7 默认
以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。
innodb 目前支持两种文件格式(innodb_file_format) Antelope 和Barracuda
5.6 默认的是 Antelope (羚羊) ,有两种“数据表格式”(row_format):Redundant(冗余)、Compact(紧凑)
5.7 默认的是 Barracuda (梭子鱼) 原来的基础上新增了两种数据表格式的支持:Dynamic 和 Compressed
一、 如何设置mysql innodb 表的压缩
设置innodb 表的 压缩
第一,mysql的版本需要大于5.5
第二,设置innodb_file_format=barracuda
innodb_file_format=barracuda
innodb_file_per_table = 1
innodb_strict_mode=1 #建议加上
innodb_default_row_format = COMPRESSED #在整个库默认启用行压缩格式时设定,一边不改变此值
第三,create table或者alter talble 增加 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
鉴于InnoDB表的最大行大小约为8K,KEY_BLOCK_SIZE=8通常是一个安全的选择
在缓冲池中,压缩数据保存在小页面中,页面大小基于该KEY_BLOCK_SIZE 值
KEY_BLOCK_SIZE默认为innodb_page_size值的一半,也就是8k
11-20
11-19
11-20
11-20
11-20
11-19
11-20
11-20
11-19
11-20
11-19
11-19
11-19
11-19
11-19
11-19