带有Latin1整理慢查询的表格,使用UTF8MB4快速 - 为什么?
表A是25K行,有十二列,约为Latin1的总数据集的8MB。
表B有2000行,其中有两个十二列,约为UTF8MB3的总数据集的5MB。
在两者之间进行内部连接的整体查询时间为1.3秒。如果我现在切换表A用于使用UTF8MB4,则查询时间为同一查询的0.05秒。
为什么仅仅因为整理/charset而在查询时间上会有如此巨大的差异?
Table A is 25k rows with a dozen columns, about 8mb of total data set to latin1.
Table B has 2000 rows with two dozen columns, about 5mb of total data set to utf8mb3.
Doing an inner join between the two the overall query time is 1.3 seconds. If I now switch table A to use utf8mb4 the query time is 0.05 seconds for the same query.
Why would there be such a massive difference in query time just because of the collation/charset?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论