最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當(dāng)前位置: 首頁 - 科技 - 知識百科 - 正文

MySQL5.6新特性測試

來源:懂視網(wǎng) 責(zé)編:小采 時間:2020-11-09 13:10:10
文檔

MySQL5.6新特性測試

MySQL5.6新特性測試:在微博上看到隔壁部門的同事發(fā)布了一個介紹MySQL 5.6新特性的slide。遂對其中幾個對我們業(yè)務(wù)有用的特性做了測試。 Found a slide which introducing new features in MySQL 5.6, which is made by a colleague in other
推薦度:
導(dǎo)讀MySQL5.6新特性測試:在微博上看到隔壁部門的同事發(fā)布了一個介紹MySQL 5.6新特性的slide。遂對其中幾個對我們業(yè)務(wù)有用的特性做了測試。 Found a slide which introducing new features in MySQL 5.6, which is made by a colleague in other

在微博上看到隔壁部門的同事發(fā)布了一個介紹MySQL 5.6新特性的slide。遂對其中幾個對我們業(yè)務(wù)有用的特性做了測試。 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

在微博上看到隔壁部門的同事發(fā)布了一個介紹MySQL 5.6新特性的slide。遂對其中幾個對我們業(yè)務(wù)有用的特性做了測試。

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: workticket
    Engine: InnoDB
    Version: 10
    Row_format: Compact
    Rows: 1471830
    Avg_row_length: 328
    Data_length: 483295232
    Max_data_length: 0
    Index_length: 260276224
    Data_free: 5242880
    Auto_increment: 3473533
    Create_time: 2013-04-15 16:01:01
    Update_time: NULL
    Check_time: NULL
    Collation: utf8_general_ci
    Checksum: NULL
    Create_options: 
    Comment: 工單表
    //壓縮后(after compress)
    Name: workticket
    Engine: InnoDB
    Version: 10
    Row_format: Compressed
    Rows: 1553544
    Avg_row_length: 143
    Data_length: 222281728
    Max_data_length: 0
    Index_length: 121192448
    Data_free: 2621440
    Auto_increment: 3473533
    Create_time: 2013-04-15 16:06:33
    Update_time: NULL
    Check_time: NULL
    Collation: utf8_general_ci
    Checksum: NULL
    Create_options: row_format=COMPRESSED
    Comment: 工單表

    但還是不夠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: 321325744
    Max_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 DDL
  • mysql> 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: 0
    mysql> 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)還是很吸引的(詳細(xì)的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?
  • 聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

    文檔

    MySQL5.6新特性測試

    MySQL5.6新特性測試:在微博上看到隔壁部門的同事發(fā)布了一個介紹MySQL 5.6新特性的slide。遂對其中幾個對我們業(yè)務(wù)有用的特性做了測試。 Found a slide which introducing new features in MySQL 5.6, which is made by a colleague in other
    推薦度:
    標(biāo)簽: 微博 新功能 看到
    • 熱門焦點(diǎn)

    最新推薦

    猜你喜歡

    熱門推薦

    專題
    Top