表压缩(innodb)
2017-10-08 21:10
134 查看
1.所有节点修改参数先
vim /home/mysql/conf/s01.cnf
vim /home/mysql/conf/s02.cnf
#compress
innodb_file_format=Barracuda
innodb_file_per_table=1
mysql> set global innodb_file_format=Barracuda;
mysql> SET GLOBAL innodb_file_per_table=1;
check:
mysql> show variables like 'innodb_file%';
2.检查状态(主)
use bdzh;
mysql> show table status like 'dim_image'\G
Row_format: Compact --未压缩
3.压缩表在线操作(主)
mysql> alter table dim_image key_block_size=8 row_format=compressed;
4.检查是否压缩( 主备)
mysql> show table status like 'dim_image'\G
Row_format: Compressed --压缩了
1.6g的表压缩到了1.2g。用时<2min。实际使用效率待测试.
vim /home/mysql/conf/s01.cnf
vim /home/mysql/conf/s02.cnf
#compress
innodb_file_format=Barracuda
innodb_file_per_table=1
mysql> set global innodb_file_format=Barracuda;
mysql> SET GLOBAL innodb_file_per_table=1;
check:
mysql> show variables like 'innodb_file%';
2.检查状态(主)
use bdzh;
mysql> show table status like 'dim_image'\G
Row_format: Compact --未压缩
3.压缩表在线操作(主)
mysql> alter table dim_image key_block_size=8 row_format=compressed;
4.检查是否压缩( 主备)
mysql> show table status like 'dim_image'\G
Row_format: Compressed --压缩了
1.6g的表压缩到了1.2g。用时<2min。实际使用效率待测试.
相关文章推荐
- [MySQL] InnoDB三大特性之 - 插入缓冲
- mysql5.7官网直译InnoDB表优化--行存储布局,事物管理
- InnoDB存储引擎关键特性
- MySQL存储引擎--MYSIAM和INNODB引擎区别
- mysql innodb 引擎内幕读书笔记1
- B+Tree index structures in InnoDB
- InnoDB Memcached Plugin源码实现调研
- MySQL中表引擎innodb和myisam的区别
- innodb数据库批量转换表引擎为MyISAM
- mysql innodb 数据库意外断电恢复
- ENGINE=InnoDB DEFAULT CHARSET=gbk AUTO_INCREMENT=1 这句话是什么意思呢?
- MySQL存储引擎之Myisam和Innodb总结性梳理-转
- MySQL配置文件优化(Innodb)
- InnoDB数据表空间文件平滑迁移
- MySQL MyISAM/InnoDB高并发优化经验
- innodb的innodb_buffer_pool_size和MyISAM的key_buffer_size
- Percona Data Recovery Tool for InnoDB工具恢复单表的案例
- mariadb日志出现InnoDB: Operating system error number 23 in a file operation
- innodb_thread_concurrency
- InnoDB事务锁之行锁--slow lock