在微博上看到隔壁部门的同事发布了一个介绍mysql 5.6新特性的slide。遂对其中几个对我们业务有用的特性做了测试。 found a slide which introducing new features in mysql 5.6, which is made by a colleague in other department. for our business, i ran
在微博上看到隔壁部门的同事发布了一个介绍mysql 5.6新特性的slide。遂对其中几个对我们业务有用的特性做了测试。
found a slide which introducing new features in mysql 5.6, which is made by a colleague in other department. for our business, i ran some tests on some features.
innodb compression//压缩前(before compress)name: workticketengine: innodbversion: 10row_format: compactrows: 1471830avg_row_length: 328data_length: 483295232max_data_length: 0index_length: 260276224data_free: 5242880auto_increment: 3473533create_time: 2013-04-15 16:01:01update_time: nullcheck_time: nullcollation: utf8_general_cichecksum: nullcreate_options: comment: 工单表
//压缩后(after compress)name: workticketengine: innodbversion: 10row_format: compressedrows: 1553544avg_row_length: 143data_length: 222281728max_data_length: 0index_length: 121192448data_free: 2621440auto_increment: 3473533create_time: 2013-04-15 16:06:33update_time: nullcheck_time: nullcollation: utf8_general_cichecksum: nullcreate_options: row_format=compressedcomment: 工单表
但还是不够myisampack后的myisam省空间
but innodb compression is less storage efficient than myisam after myisampack.
-rw-rw---- 1 mysql mysql 9.5k apr 16 09:35 workticket.frm-rw-rw---- 1 mysql mysql 9.5k apr 16 09:45 workticket_innodb.frm-rw-rw---- 1 mysql mysql 336m apr 16 09:58 workticket_innodb.ibd-rw-rw---- 1 mysql mysql 199m apr 16 09:41 workticket.myd-rw-rw---- 1 mysql mysql 86m apr 16 09:44 workticket.myi
name: workticket engine: myisam version: 10 row_format: dynamic rows: 1593851 avg_row_length: 201 data_length: 321325744max_data_length: 281474976710655 index_length: 130242560 data_free: 0 auto_increment: 3473533 create_time: 2013-04-16 09:35:53 update_time: 2013-04-16 09:41:09 check_time: 2013-04-16 09:37:03 collation: utf8_general_ci checksum: null create_options: comment: 工单表
innodb online ddlmysql> alter table `workticket` add column `test_col` int not null after sid, lock=none;query ok, 0 rows affected (5 min 25.17 sec)records: 0 duplicates: 0 warnings: 0mysql> set old_alter_table=1;query ok, 0 rows affected (0.00 sec)mysql> alter table `workticket` add column `test_col` int not null after sid, lock=none; error 1846 (0a000): lock=none is not supported. reason: copy algorithm requires a lock. try lock=shared.mysql> alter table `workticket` add column `test_col` int not null after sid, lock=shared;query ok, 1593851 rows affected (4 min 11.89 sec)records: 1593851 duplicates: 0 warnings: 0
虽然总体耗时更长,但ddl过程中不锁表(可query and/or 可dml)还是很吸引的(详细的ddl操作是否可query and/or 可dml可参见文档)。
although costing more time, that the table can be query and/or execute dml query is very amazing. (detail can be seen in documentation)
innodb-transportable tablespaces
没什么可测试的,就是操作成功。用途?建slave?备份?
nothing interesting to test. it just works. what can i do with this feature? maybe building up a slave server? or backup up the database? 原文地址:mysql 5.6新特性测试, 感谢原作者分享。