MySQL 9.7 LTS: Enterprise Features Unlocked for Community, Hypergraph Optimizer & PGO
MySQL 9.7 LTS brings enterprise-grade features like replication observability, hypergraph optimizer, PGO, and JSON Duality Views DML to the community edition, delivering up to 14% performance gains via PGO, but lacks vector similarity search functions for RAG workloads.
MySQL 9.7.0 LTS Release Overview
Oracle released MySQL 9.7.0 LTS on April 21, 2026. The 9.x series follows a quarterly innovation release cadence, while LTS versions arrive roughly every two years with 5 years of Premier Support plus 3 years of Extended Support. This LTS marks the transition of the 9.x line from preview to production-ready.
Enterprise Features Now Available in Community Edition
A DBA noted: "Used MySQL for ten years, finally don't need to buy enterprise license just to see replication lag." MySQL 9.7 opens a batch of previously enterprise-only features to the community edition, addressing three operational pain points: replication monitoring, complex query optimization, and data security.
Replication Applier Metrics – fine-grained, thread-level replication delay metrics (previously enterprise-only)
Group Replication Flow Control Statistics – detailed flow control stats for group replication
Group Replication Primary Election – primary election visibility
Group Replication Resource Manager – resource management for group replication
OpenTelemetry/OTLP Telemetry – direct Prometheus integration without enterprise license
Hypergraph Optimizer – new query optimizer for complex joins
JSON Duality Views DML – community edition now supports INSERT, UPDATE, DELETE on JSON views (was read-only)
Profile-Guided Optimization (PGO) – compiler optimization using runtime profiles
Replication Observability: Fine-Grained Metrics
Previously only Seconds_Behind_Master was available. Now Replication Applier Metrics exposes thread-level indicators: what each worker thread is processing, where it stalls, and its latency. Group Replication Flow Control Statistics reveals which node slows down the entire group. These metrics integrate directly with Prometheus, eliminating the need for enterprise licensing for monitoring.
Hypergraph Optimizer: Complex JOIN Improvements
Traditional MySQL uses a left-deep tree for execution plans, often choosing suboptimal plans for multi-table joins and nested subqueries. The Hypergraph Optimizer builds a hypergraph of the entire query and applies dynamic programming to find the optimal plan.
-- Before: multi-table JOIN may pick wrong plan
SELECT o.id, u.name, p.title
FROM orders o
JOIN users u ON o.user_id = u.id
JOIN products p ON o.product_id = p.id
JOIN categories c ON p.category_id = c.id
WHERE o.created_at > '2026-01-01'
AND c.name = 'electronics';
-- MySQL 9.7: enable hypergraph optimizer
SET optimizer_switch='hypergraph_optimizer=on';Caution: Percona founder Peter Zaitsev warns the new optimizer does not guarantee faster performance for every workload; it can sometimes regress. Do not enable globally without testing. Benchmark complex JOIN scenarios in a test environment first, then roll out gradually.
Profile-Guided Optimization (PGO): Free Performance Lift
PGO collects runtime profiles from a typical workload, then recompiles the binary to improve instruction cache utilization, branch prediction, and function inlining. Percona's rigorous benchmarks show:
2GB buffer pool : average 3.0% gain, best 5.5% at 4 threads
12GB buffer pool : average 4.1% gain, best 8.6% at 4 threads
32GB buffer pool : average 12.2% gain, best 14.3% at 1 thread
Key finding: gains come purely from CPU-level optimizations; buffer pool hit rate, lock contention, and I/O metrics remain nearly identical. No configuration changes or hardware upgrades required—simply upgrade to a PGO-built binary. Benefits are most pronounced on servers with large buffer pools (32GB+).
JSON Duality Views: Full DML Support
JSON Duality Views allow the same data to be accessed both relationally and as JSON documents. Previously community edition was read-only. MySQL 9.7 enables full DML:
-- Community edition can now write
INSERT INTO user_json_view (name, email, address)
VALUES ('张三', '[email protected]', '{"city": "北京"}');
UPDATE user_json_view
SET address = '{"city": "上海"}'
WHERE name = '张三';This significantly increases practical value for applications needing both relational and document access patterns.
Missing: Vector Similarity Search
MySQL 9.7 introduces the VECTOR data type with TO_VECTOR() and FROM_VECTOR() functions, but the critical similarity search functions DISTANCE() and VECTOR_DISTANCE() are only available in HeatWave (Oracle Cloud). Community and on-premise enterprise editions lack them. Percona Server for MySQL 9.7.2 adds its own DISTANCE() implementation supporting COSINE, EUCLIDEAN, MANHATTAN, and DOT metrics, but this is not Oracle's official solution. For RAG on community edition, options are Percona's build or syncing vectors to a dedicated vector database.
Pros and Cons
Pros
Community edition gains enterprise features: replication observability, group replication flow control, hypergraph optimizer, OpenTelemetry telemetry.
PGO delivers measurable performance gains (up to 14.3%) without config or hardware changes.
Hypergraph optimizer improves complex JOIN and nested subquery plans.
JSON Duality Views now support DML, enhancing practical utility.
8-year support lifecycle (5+3 years) provides long-term planning stability.
Cons
Vector similarity search missing; DISTANCE() / VECTOR_DISTANCE() only in HeatWave.
Hypergraph optimizer requires careful testing; community benchmarks show possible regressions in write-heavy workloads.
Removed/deprecated legacy variables: innodb_log_file_size, innodb_undo_tablespaces – configuration adjustments needed on upgrade.
Public repository commit volume reportedly declining.
Applicability Scenarios
OLTP needing replication observability – strongly recommended; community edition finally gets fine-grained replication metrics.
Reporting systems with complex JOINs – strongly recommended; hypergraph optimizer can dramatically improve plans.
Servers with 32GB+ buffer pool – strongly recommended; PGO yields maximum benefit.
Applications requiring JSON + relational hybrid access – strongly recommended; JSON Duality Views now writable.
Long-term projects upgrading from 8.4 – recommended; 8-year support but test compatibility.
Community edition RAG/vector search – evaluate; similarity functions absent, need Percona or external vector DB.
Write-intensive ultra-high-frequency OLTP – evaluate; some benchmarks show potential regressions.
Conclusion
MySQL 9.7 LTS delivers features that directly address real community pain points: replication observability, hypergraph optimizer, PGO, and writable JSON Duality Views. The gap between community and enterprise editions has narrowed significantly.
It is a "worth upgrading" version , especially if you struggle with replication lag, run complex JOIN queries, or operate servers with 32GB+ buffer pools.
Before upgrading, do three things: backup data, run compatibility tests in a staging environment, and benchmark hypergraph optimizer on/off for your complex JOIN workloads.
Database upgrades are not about "newer is better" but "upgrade early once you confirm it solves your problems."
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.
Su San Talks Tech
Su San, former staff at several leading tech companies, is a top creator on Juejin and a premium creator on CSDN, and runs the free coding practice site www.susan.net.cn.
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.
