主键乱序插入对Innodb性能的影响_MySQL
来源:动视网
责编:小采
时间:2020-11-09 18:03:21
主键乱序插入对Innodb性能的影响_MySQL
主键乱序插入对Innodb性能的影响_MySQL:bitsCN.com 在平时的mysql文档学习中我们经常会看到这么一句话:MySQL tries to leave space so that future inserts do not incur un-necessary page splits (and thus higher IO cost). In an ideal wo
导读主键乱序插入对Innodb性能的影响_MySQL:bitsCN.com 在平时的mysql文档学习中我们经常会看到这么一句话:MySQL tries to leave space so that future inserts do not incur un-necessary page splits (and thus higher IO cost). In an ideal wo

测试数据准备
简介: 顺序数据通过sysbench --oltp-table-size = 8000000 生成,然后通过order by rand() 生成乱序数据。
mysql> desc sbtest;+-------+------------------+------+-----+---------+----------------+| Field | Type | Null | Key | Default | Extra |+-------+------------------+------+-----+---------+----------------+| id | int(10) unsigned | NO | PRI | NULL | auto_increment || k | int(10) unsigned | NO | MUL | 0 | || c | char(120) | NO | | | || pad | char(60) | NO | | | |+-------+------------------+------+-----+---------+----------------+
bitsCN.com
主键乱序插入对Innodb性能的影响_MySQL
主键乱序插入对Innodb性能的影响_MySQL:bitsCN.com 在平时的mysql文档学习中我们经常会看到这么一句话:MySQL tries to leave space so that future inserts do not incur un-necessary page splits (and thus higher IO cost). In an ideal wo