您的当前位置:首页正文

主键乱序插入对Innodb性能的影响_MySQL

2020-11-09 来源:尚佳旅游分享网

测试数据准备

简介: 顺序数据通过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
显示全文