mysql InnoDB UUID 主键 性能优化【性能分析篇】.md
mysql InnoDB UUID 主键 性能优化【性能分析篇】.md
北京起航 发表于3年前
mysql InnoDB UUID 主键 性能优化【性能分析篇】.md
  • 发表于 3年前
  • 阅读 594
  • 收藏 29
  • 点赞 0
  • 评论 1
摘要: mysql InnoDB UUID 主键 性能优化【实践篇】.md 有序uuid mysql InnoDB UUID 主键 性能优化【原理篇】.md mysql InnoDB UUID 主键 性能优化【性能分析篇】.md

mysql uuid 主键 性能优化【性能分析篇】.md mysql InnoDB UUID 主键 性能优化【实践篇】.md 有序uuid mysql InnoDB UUID 主键 性能优化【原理篇】.md mysql InnoDB UUID 主键 性能优化【性能分析篇】.md ###性能分析

Benchmarking 主键字段的三种存储方式

events_uuid – UUID binary(16) PRIMARY KEY
events_int – 自增序列bigint(20) NOT NULL AUTO_INCREMENT,
events_uuid_ordered – Rearranged UUID binary(16) as PRIMARY KEY

I created three stored procedures which insert 25K random rows at a time into the respective tables. There are three more stored procedures which call the random insert-stored procedures in a loop and also calculate the time taken to insert 25K rows and data and index size after each loop. Totally I have inserted 25M records.

###1.数据大小

Data Size Horizontal Axis – Number of inserts x 25,000 Vertical Axis – Data Size in MB The data size for UUID table is more than other two tables. 输入图片说明 ###2.索引大小 Index Size Horizontal axis – Number of inserts x 25,000 Vertical axis – Index Size in MB 输入图片说明 ###3.总大小 Horizontal Axis – Number of inserts x 25,000 Vertical Axis – Total Size in MB 输入图片说明 ###4.时间Time taken Horizontal axis – Number of inserts x 25,000 Vertical axis – Time Taken in seconds 输入图片说明 参考https://www.percona.com/blog/2014/12/19/store-uuid-optimized-way/

共有 人打赏支持
粉丝 50
博文 51
码字总数 29304
评论 (1)
苟氏杰
说明使用uuid效率更好
×
北京起航
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: