当前位置: 首页 > news >正文

MySQL 升级:MySQL Server 变更详解 (8.0.36 ~ 8.0.37)

2024 年上半年,MySQL Server 共发布了两个版本:

  1. MySQL 8.0.36, 2024-01-16
  2. MySQL 8.0.37, 2024-04-30

下面探讨这些版本的重要变更,并以 MySQL 8.0.37 为例做演示。

优化器

  1. (MySQL 8.0.36) The hashing algorithm employed yielded poor performance when using a HASH field to check for uniqueness. (Bug #109548, Bug #34959356)

示例:

问题复现案例中的执行计划,新版本执行很快,问题版本则要若干秒。

mysql> EXPLAIN ANALYZE SELECT COUNT(*) FROM ( SELECT value FROM product GROUP BY code, name, comment, platform ) derived\G
*************************** 1. row ***************************
EXPLAIN: -> Aggregate: count(0)  (cost=8600..8600 rows=1) (actual time=40.5..40.5 rows=1 loops=1)
    -> Table scan on derived  (cost=6329..6584 rows=20167) (actual time=37.6..39.6 rows=20000 loops=1)
        -> Materialize  (cost=6329..6329 rows=20167) (actual time=37.6..37.6 rows=20000 loops=1)
            -> Table scan on <temporary>  (cost=4058..4312 rows=20167) (actual time=32.9..36 rows=20000 loops=1)
                -> Temporary table with deduplication  (cost=4058..4058 rows=20167) (actual time=32.9..32.9 rows=20000 loops=1)
                    -> Table scan on product  (cost=2041 rows=20167) (actual time=0.0257..14.6 rows=20000 loops=1)

1 row in set (0.04 sec)
  1. (MySQL 8.0.37) The multi-range read (MRR) optimization did not perform as well as in previous releases. (Bug #113711, Bug #36220640)

解析:

MySQL 8.0.36 开启 MRR 后,主键排序性能下降。

MRR 可用于表的索引范围扫描和等值连接操作。当使用 MRR 时,EXPLAIN 输出中的 Extra 列显示 Using MRR

Performance Schema

  1. (MySQL 8.0.36) When executing a stored program, the Performance Schema instrumentation caused some unnecessary overhead. As of this release, all stored procedure micro instructions (statement/sp/%), except statement/sp/stmt, are disabled by default. (Bug #27934653)

示例:

mysql> SELECT name,enabled,timed
    -> FROM performance_schema.setup_instruments
    -> WHERE name LIKE 'statement/sp/%';
+--------------------------------+---------+-------+
| name                           | enabled | timed |
+--------------------------------+---------+-------+
| statement/sp/stmt              | YES     | YES   |
| statement/sp/set               | NO      | NO    |
| statement/sp/set_trigger_field | NO      | NO    |
| statement/sp/jump              | NO      | NO    |
| statement/sp/jump_if_not       | NO      | NO    |
| statement/sp/freturn           | NO      | NO    |
| statement/sp/hpush_jump        | NO      | NO    |
| statement/sp/hpop              | NO      | NO    |
| statement/sp/hreturn           | NO      | NO    |
| statement/sp/cpush             | NO      | NO    |
| statement/sp/cpop              | NO      | NO    |
| statement/sp/copen             | NO      | NO    |
| statement/sp/cclose            | NO      | NO    |
| statement/sp/cfetch            | NO      | NO    |
| statement/sp/error             | NO      | NO    |
| statement/sp/set_case_expr     | NO      | NO    |
+--------------------------------+---------+-------+
16 rows in set (0.00 sec)

功能

  1. (MySQL 8.0.36) For platforms on which OpenSSL libraries are bundled, the linked OpenSSL library for MySQL Server has been updated to version 3.0.12. Issues fixed in OpenSSL version 3.0.12 are described at https://www.openssl.org/news/cl30.txt. (Bug #36033684)

  2. (MySQL 8.0.37) For platforms on which OpenSSL libraries are bundled, the linked OpenSSL library for MySQL Server has been updated to version 3.0.13. Issues fixed in OpenSSL version 3.0.13 are described at https://www.openssl.org/news/cl30.txt. (Bug #36261675)

解析:

在 Oracle Linux 7 上仍可使用 openssl 1.1.1,但在 Oracle Linux 8/9 系统,则应使用 openssl 3。

  1. (MySQL 8.0.37) Group Replication: When issued with group_replication_consistency set to BEFORE_ON_PRIMARY_FAILOVER, the MySQL KILL statement now ignores any consistency guarantees, with any interrupted transactions now being rolled back.

  2. (MySQL 8.0.37) Packaging: Added support for Fedora 40 and Ubuntu 24.04.

解析:

Fedora 40 将作为 CentOS Stream 10 和 RHEL 10 的上游,意味着 MySQL 已经在为新版本的企业级操作系统做准备。

  1. (MySQL 8.0.37) The clone plugin version requirements were relaxed to allow cloning between different point releases in the same series. In other words, only the major and minor version numbers must match when previously the point release number also had to match.

问题修复

  1. (MySQL 8.0.37) The Robin Hood hashing library has been replaced with unordered_dense. (Bug #36158022)

解析:

从 MySQL 8.0.37 开始,引入 ankerl::unordered_dense v4.4.0 类库,替换掉之前的 robin-hood-hashing

unordered_dense 是一个高性能哈希表实现,基于 robin-hood 后移删除算法,适用于 C++17 及更高版本。

本文由 mdnice 多平台发布

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • Fiddler不仅可以抓包,还可以做接口测试喔
  • 【ACM出版,高录用EI快检索】第七届计算机信息科学与人工智能国际学术会议(CISAI 2024,9月6-8)
  • 硬布线控制器的设计
  • MinerU pdf文档解析markdown格式、内容提取
  • 【Qt笔记】Qt建立UDP通信
  • 面试题:Rabbitmq怎么保证消息的可靠性?
  • 电脑桌面管理如何做?2024电脑桌面终极管理方法分享
  • 【安全靶场】-DC-5
  • 『基础』OS-1计算机系统概述_操作系统发展历程及它的运行环境
  • 机器人蓝牙通信绕坑
  • 【pip镜像设置】pip使用清华镜像源安装
  • <数据集>无人机航拍不同高度牧羊识别数据集<目标检测>
  • day06_算法训练
  • 星露谷模组开发教程#6 烹饪和制造配方
  • 免费高画质提取PPT/Word/Excel中的图片工具
  • 【MySQL经典案例分析】 Waiting for table metadata lock
  • 08.Android之View事件问题
  • electron原来这么简单----打包你的react、VUE桌面应用程序
  • express如何解决request entity too large问题
  • JavaScript函数式编程(一)
  • Vim 折腾记
  • 从零开始的webpack生活-0x009:FilesLoader装载文件
  • 计算机常识 - 收藏集 - 掘金
  • 前端每日实战:70# 视频演示如何用纯 CSS 创作一只徘徊的果冻怪兽
  • 突破自己的技术思维
  • 看到一个关于网页设计的文章分享过来!大家看看!
  • kubernetes资源对象--ingress
  • #基础#使用Jupyter进行Notebook的转换 .ipynb文件导出为.md文件
  • #免费 苹果M系芯片Macbook电脑MacOS使用Bash脚本写入(读写)NTFS硬盘教程
  • $().each和$.each的区别
  • (1) caustics\
  • (CPU/GPU)粒子继承贴图颜色发射
  • (LeetCode C++)盛最多水的容器
  • (编译到47%失败)to be deleted
  • (附源码)spring boot儿童教育管理系统 毕业设计 281442
  • (附源码)ssm本科教学合格评估管理系统 毕业设计 180916
  • (论文阅读23/100)Hierarchical Convolutional Features for Visual Tracking
  • (七)Activiti-modeler中文支持
  • (企业 / 公司项目)前端使用pingyin-pro将汉字转成拼音
  • (算法)Travel Information Center
  • (算法)前K大的和
  • (学习日记)2024.03.12:UCOSIII第十四节:时基列表
  • (一) storm的集群安装与配置
  • (一一四)第九章编程练习
  • (转)AS3正则:元子符,元序列,标志,数量表达符
  • (转载)Linux 多线程条件变量同步
  • .ai域名是什么后缀?
  • .net core 6 集成 elasticsearch 并 使用分词器
  • .net core开源商城系统源码,支持可视化布局小程序
  • .net framework4与其client profile版本的区别
  • .Net6 Api Swagger配置
  • .NET大文件上传知识整理
  • .NET国产化改造探索(三)、银河麒麟安装.NET 8环境
  • ::
  • ::什么意思