MySQL 9.7 LTS: Writable JSON Duality Views & Hypergraph Optimizer for Community Edition
MySQL 9.7 LTS introduces writable JSON Duality Views and the Hypergraph optimizer in the community edition, enhances replication observability and high‑availability automation, adds audit log rotation and stronger password hashing, but warns that the new optimizer requires regression testing due to mixed performance impact.
JSON Duality Views Finally Writable
JSON Duality Views map a single JSON view to multiple relational tables, allowing applications to use a document model while the storage remains relational. Until MySQL 9.7, the community edition only supported read operations. Version 9.7 adds INSERT, UPDATE, and DELETE support for JSON Duality Views , including auto‑generated primary keys via auto‑increment columns. This enables using Duality Views as the primary application interface rather than a read‑only presentation layer.
Hypergraph Optimizer Enters Community Edition
The Hypergraph optimizer uses a graph‑based search for join ordering, theoretically finding better plans for complex queries with nested subqueries and many‑table joins. It is not enabled by default ; enabling it can change execution plans, making some slow queries faster and others slower. A DBA tested the three slowest production SQL statements: two improved, but one nested subquery became slower because the optimizer’s cost estimation shifted. Regression comparison is mandatory before enabling in production.
Operational Observability and High‑Availability Improvements
Group Replication flow‑control monitoring : new granular status variables track throttled transaction count, cumulative throttle time, current throttle count, and last throttle timestamp. Requires installing the corresponding component.
Multi‑threaded replication extended statistics : per‑worker progress and detection of single‑transaction worker monopolization that causes replication lag.
Auto eviction and rejoin : nodes evicted due to applier lag, recovery lag, or memory limits can automatically attempt to rejoin using group_replication_autorejoin_tries, with a grace period to prevent immediate re‑eviction.
Smarter primary election : Group Replication Manager now prefers the replica with the most up‑to‑date synchronization state.
Other Notable Changes
Audit log componentization : supports time‑based rotation via audit_log.rotate_on_time and adds an invalid‑filter recovery mode that falls back to the default policy on startup if filter configuration is corrupt.
Authentication security enhancement : caching_sha2_password now supports PBKDF2 storage format (SHA‑512) for stronger password protection, migratable without client changes.
cpuset cgroup support : MySQL correctly detects the number of logical CPUs limited by cgroups, improving resource calculation in containerized environments.
Replica can replicate from higher‑version source : new variable replica_allow_higher_version_source permits asynchronous replication from a newer major version, facilitating rolling upgrade topologies.
InnoDB log writer threads default adjustment : innodb_log_writer_threads default now depends on whether binlog is enabled and the number of logical CPUs, but existing configured values are not overridden.
Upgrade Guidance
MySQL 8.0 reached EOL in April 2026. The current long‑term support lines are 8.4 LTS (supported until 2032) and 9.7 LTS (supported until 2034, two years longer). Evaluation of 9.7 is recommended for workloads involving complex join optimization , JSON document read/write , or compliance‑driven dynamic data masking (an enterprise‑edition feature). However, Hypergraph optimizer regression testing is a hard prerequisite and cannot be skipped.
In summary: the community edition gains JSON DML and the Hypergraph optimizer, observability and HA behaviors mature, but the new optimizer’s benefit varies by workload — test before deploying.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Coder Trainee
Experienced in Java and Python, we share and learn together. For submissions or collaborations, DM us.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
