What's New in MySQL 9 - a DBA's Perspective
Originally posted in https://www.bytebase.com/blog/what-is-new-in-mysql-9/
Hi and welcome to Database DevOps Academy #89! We share Database DevOps insights and best practices for modern engineering organizations weekly. 🚌
In Issue #89, we provide a comprehensive overview of what's new in the entire MySQL 9.x series. 🌹
Release Timeline
This post provides a comprehensive overview of what's new in the entire MySQL 9.x series (9.0, 9.1, 9.2, and 9.3), organized by edition type and including notable bug fixes and dropped features.
MySQL Community New Features
VECTOR Type Support (9.0)
MySQL 9.0 introduced a new VECTOR data type, which is a timely addition for applications working with vector data, such as machine learning and AI applications.
DBA Note: First-generation implementation with significant limitations - can't be used as keys and has limited function compatibility. Don't expect performance to match dedicated vector databases yet.
Key Capabilities
Vector Functions
MySQL 9.0 includes several functions for working with vector data:
Enhanced Foreign Key Constraints (9.0)
MySQL 9.0 enhances foreign key handling with long-waited improvements to standards compliance and usability.
DBA Note: This fixes long-standing behavior that should have worked correctly years ago. Test carefully when upgrading as applications that relied on the previous broken behavior may now encounter constraint violations.
Improvements
Saving JSON Output from EXPLAIN ANALYZE (9.0)
MySQL 9.0 provides support for saving the output from EXPLAIN ANALYZE into a user variable.
DBA Note: Useful for automated query analysis, but you'll still need to build your own tools to make practical use of the JSON output. Would have been nice to include helper functions for common analysis tasks.
Trigger Handling Optimization (9.1)
Optimizer Improvements (9.2-9.3)
Performance Schema Enhancements (9.1-9.3)
MySQL Enterprise New Features
JavaScript Stored Programs (9.0+)
MySQL 9.0 Enterprise Edition introduced support for stored programs written in JavaScript through the Multilingual Engine Component (MLE). This feature has been continuously enhanced in subsequent releases.
DBA Note: While this opens up database programming to JavaScript developers, expect potential performance overhead compared to native SQL stored procedures. Monitor memory usage carefully in production.
Key Capabilities in 9.0
JavaScript Enhancements in 9.1-9.3
Replication Enhancements (9.1-9.3)
MySQL Option Tracker (9.1-9.3)
Noticeable Bugs Fixed
Critical InnoDB Server Restart Issue (9.0.1)
Bug #36808732 (Fixed in MySQL 9.0.1)
A critical issue in MySQL 9.0.0 caused the server to fail to restart after creating a large number of tables (8001 or more). This bug was so severe that it led to the removal of MySQL 9.0.0 from distribution, with users advised to upgrade directly to MySQL 9.0.1 instead.
DBA Note: A reminder of why you should never deploy .0 releases to production. This kind of fundamental issue making it to GA release raises questions about testing procedures.
Improved InnoDB Tablespace File Scan Performance (9.0.1)
Bug #110402, Bug #35200385 (Fixed in MySQL 9.0.1)
MySQL 9.0.1 includes improvements to tablespace file scan performance at startup, which can reduce server startup times, especially for installations with many tablespaces.
DBA Note: Welcome improvement for environments with many tablespaces, but startup times will still be noticeably slower than competing databases with large numbers of tables.
Group Replication CREATE TABLE ... SELECT Fix (9.0.1)
Bug #36784284 (Fixed in MySQL 9.0.1)
Running a CREATE TABLE ... SELECT statement on a source coming from an asynchronous channel to Group Replication previously led to errors on the replica. This issue has been resolved in MySQL 9.0.1.
DBA Note: Group Replication continues to have edge cases and reliability issues. Test thoroughly with your specific workload before deploying to production.
Performance Schema Service Thread Exposure (9.3)
Fixed issue where the PERFORMANCE_SCHEMA service thread v7 was not exposed, preventing its use by components.
Features Removed in MySQL 9.0
MySQL 9.0 has removed several features that were present in previous versions. Applications using these features should be updated to use alternatives.
Authentication Plugin Removals
mysql_native_password Plugin
The mysql_native_password authentication plugin, which was deprecated in MySQL 8.0, has been completely removed in MySQL 9.0. The server now rejects mysql_native authentication requests from older client programs that do not have CLIENT_PLUGIN_AUTH capability.
DBA Note: This will break connections from many legacy applications and tools. Plan for significant connection string updates across your environment when upgrading.
Related Removals:
Due to this change, the following server options and variables have also been removed:
Storage Engine Removals
Several storage engines have been removed in MySQL 9.0:
DBA Note: Expected house cleanup. The removal of MEMORY engine could be concerning for high-performance temporary tables. You'll need to rethink some performance optimization strategies that relied on these specialized engines.
Important Changes in MySQL 9.3
Is It Worth Upgrading from MySQL 8.0 to 9.0?
When considering whether to upgrade from MySQL 8.0 to MySQL 9.0, it's valuable to compare this transition with the previous major upgrade from MySQL 5.7 to 8.0.
Scale of Changes
MySQL 5.7 to 8.0 Upgrade:
MySQL 8.0 to 9.0 Upgrade:
DBA Note: The 8.0 to 9.0 upgrade is less disruptive than the 5.7 to 8.0 transition was. The 5.7 to 8.0 upgrade was one of the most challenging in MySQL history due to fundamental architectural changes, while 9.0 builds on the foundation established in 8.0.
Migration Challenges
MySQL 5.7 to 8.0 Upgrade Challenges:
MySQL 8.0 to 9.0 Upgrade Challenges:
DBA Note: The removal of several storage engines in 9.0 is the most significant migration challenge, but only affects applications specifically using ARCHIVE, BLACKHOLE, FEDERATED, MEMORY, or MERGE engines. Most modern applications using InnoDB will face minimal disruption.
Performance Considerations
MySQL 5.7 to 8.0 Performance Changes:
MySQL 8.0 to 9.0 Performance Changes:
DBA Note: Unlike the 5.7 to 8.0 upgrade which sometimes resulted in unexpected performance changes requiring tuning, the 9.0 upgrade appears to maintain performance characteristics similar to 8.0 with incremental improvements.
When to Upgrade to MySQL 9.0
The upgrade from MySQL 8.0 to 9.0 represents a more incremental improvement compared to the transformative jump from 5.7 to 8.0. For most users, the decision to upgrade should be driven by specific feature requirements rather than a general need to stay current.
Unlike the 5.7 to 8.0 transition—which became increasingly urgent as 5.7 approached its end-of-life—the move to 9.0 is more optional, especially for those on the 8.0 LTS track, which will continue to be supported for years to come.
If you're currently on MySQL 8.0 LTS and don't require any of the new features introduced in 9.0, there's little urgency to upgrade. It's also worth noting that the MySQL 9.x family has not yet announced an LTS release. For this reason, we recommend holding off on upgrading until an LTS version is officially announced.
References