<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答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)前位置: 首頁 - 科技 - 知識百科 - 正文

        WhyALTERTABLErunsfasteronPerconaServer5.5vs.MySQL_MySQL

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

        WhyALTERTABLErunsfasteronPerconaServer5.5vs.MySQL_MySQL

        WhyALTERTABLErunsfasteronPerconaServer5.5vs.MySQL_MySQL:Some of us Perconians are atOpenStack summitthis week in Atlanta.Matt Griffin, our director of product management,tweetedabout the turbo-hipster CI talk about their experience of ALTER TABLEs running faster on Percona Server. Oracles Morga
        推薦度:
        導(dǎo)讀WhyALTERTABLErunsfasteronPerconaServer5.5vs.MySQL_MySQL:Some of us Perconians are atOpenStack summitthis week in Atlanta.Matt Griffin, our director of product management,tweetedabout the turbo-hipster CI talk about their experience of ALTER TABLEs running faster on Percona Server. Oracles Morga
        OpenStack 2014Some of us Perconians are atOpenStack summitthis week in Atlanta.Matt Griffin, our director of product management,tweetedabout the turbo-hipster CI talk about their experience of ALTER TABLEs running faster on Percona Server. Oracle’s Morgan Tockerthentweeted in response, asking why this was the case. I decided that the simplest way to answer that was here in this post.

        The reason for this is the expand_fast_index_creation feature of Percona Server. I did a quick schema change on MySQL 5.5 and Percona Server 5.5 to demonstrate this(in the talk, the speaker mentioned that these versions were used).

        The schema modifications in the talk could fall in 2 categories, the ones that could use fast index creation and the ones that could not.

        I did the following tests on my laptop, on a sysbench tale with 300k records.

        Vanilla MySQL 5.5:

        mysql> alter table sbtest1 add index idx_c(c);Query OK, 0 rows affected (4.37 sec)

        mysql>altertablesbtest1addindexidx_c(c);

        QueryOK,0rowsaffected(4.37sec)

        Percona Server 5.5:

        mysql> alter table sbtest1 add index idx_c(c);Query OK, 0 rows affected (3.90 sec)

        mysql>altertablesbtest1addindexidx_c(c);

        QueryOK,0rowsaffected(3.90sec)

        We know that this used fast index creation from the 0 rows affected. In this case, there is nor substantial difference between the 2 servers, also probably my laptop with CPU frewquency scaling doesn’t have the most consistent performance in the world.

        For the second schema change, I added a column which copies the table.

        Vanilla MySQL 5.5:

        mysql> alter table sbtest1 add column d int default 0;Query OK, 300000 rows affected (37.05 sec)Records: 300000Duplicates: 0Warnings: 0

        mysql>altertablesbtest1addcolumndintdefault0;

        QueryOK,300000rowsaffected(37.05sec)

        Records:300000 Duplicates:0 Warnings:0

        Percona Server 5.5:

        mysql> alter table sbtest1 add column d int default 0;Query OK, 300000 rows affected (9.51 sec)Records: 300000Duplicates: 0Warnings: 0

        mysql>altertablesbtest1addcolumndintdefault0;

        QueryOK,300000rowsaffected(9.51sec)

        Records:300000 Duplicates:0 Warnings:0

        The reason for this speed difference is that in case of Percona Server, for the table copy, the table is created only with a primary key, and the secondary indexes are built at the end of the process (rather than on the fly). For more details, checkAlexey’s blog poston this topic.

        This can be tuned further, by tuning innodb_merge_sort_block_size (in Percona Server 5.6, this is replaced by innodb_sort_buffer_size).

        mysql> select @@innodb_merge_sort_block_size/1024/1024;+------------------------------------------+| @@innodb_merge_sort_block_size/1024/1024 |+------------------------------------------+| 1.00000000 |+------------------------------------------+1 row in set (0.00 sec)mysql> set innodb_merge_sort_block_size=8*1024*1024;Query OK, 0 rows affected (0.00 sec)mysql> alter table sbtest1 add column d int default 0;Query OK, 300000 rows affected (8.61 sec)Records: 300000Duplicates: 0Warnings: 0

        mysql>select@@innodb_merge_sort_block_size/1024/1024;

        +------------------------------------------+

        |@@innodb_merge_sort_block_size/1024/1024|

        +------------------------------------------+

        | 1.00000000|

        +------------------------------------------+

        1rowinset(0.00sec)

        mysql>setinnodb_merge_sort_block_size=8*1024*1024;

        QueryOK,0rowsaffected(0.00sec)

        mysql>altertablesbtest1addcolumndintdefault0;

        QueryOK,300000rowsaffected(8.61sec)

        Records:300000 Duplicates:0 Warnings:0

        So, in order to be accurate, schema changes are faster in Percona Server if they are table copies and if the tables have secondary indexes.

        聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        WhyALTERTABLErunsfasteronPerconaServer5.5vs.MySQL_MySQL

        WhyALTERTABLErunsfasteronPerconaServer5.5vs.MySQL_MySQL:Some of us Perconians are atOpenStack summitthis week in Atlanta.Matt Griffin, our director of product management,tweetedabout the turbo-hipster CI talk about their experience of ALTER TABLEs running faster on Percona Server. Oracles Morga
        推薦度:
        標(biāo)簽: 5.5 mysql run
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 伊人免费在线观看| 免费无码又爽又黄又刺激网站| 中文字幕无码一区二区免费| 亚洲AV无码不卡在线观看下载| 特级毛片全部免费播放a一级 | 亚洲精品无码不卡在线播HE| 亚洲视频免费在线播放| 成人免费视频国产| 亚洲爆乳无码专区www| 国产成人免费手机在线观看视频 | 久久久www成人免费毛片| 亚洲精品无码永久在线观看你懂的 | 最近免费中文字幕大全免费| 亚洲欧洲精品一区二区三区| 亚洲人成在线影院| 免费人成视频在线观看网站| 亚洲视频在线不卡| 国产精品黄页在线播放免费| 一级毛片免费观看不收费| 亚洲精品二区国产综合野狼| 永久在线免费观看| 国产亚洲欧美日韩亚洲中文色| 97碰公开在线观看免费视频| 亚洲短视频男人的影院| 国产1000部成人免费视频| 亚洲AV无码片一区二区三区| 中文字幕第一页亚洲| 日本zzzzwww大片免费| 亚洲精品美女久久久久久久| 国产亚洲精品免费视频播放| 在线免费中文字幕| 激情婷婷成人亚洲综合| 婷婷精品国产亚洲AV麻豆不片| 成人免费男女视频网站慢动作| www成人免费视频| 亚洲福利秒拍一区二区| 全亚洲最新黄色特级网站| 免费无码VA一区二区三区 | 精品国产福利尤物免费| 免费大片在线观看网站| 国产三级在线免费|