tencent cloud

TDSQL-C for MySQL

AI Optimizer Overview

Download
Focus Mode
Font Size
Last updated: 2026-06-09 15:29:35
TDSQL-C for MySQL provides the AI optimizer feature. This feature uses a self-learning optimizer to automatically explore better execution plans, thereby achieving automatic database tuning.
Note:
Note: This feature is currently in the allowlist-based grayscale release phase. If you do not see the feature entry in the console, please wait patiently. For any questions, you can submit a ticket for feedback.

Background

During database Ops and development, a large number of repetitive execution plan deviations frequently occur in online performance issues and POC scenarios. In the traditional model, such issues typically require manual intervention for troubleshooting. This leads to long troubleshooting cycles, significant manpower investment, and difficulty in tuning within SaaS scenarios.
To address these pain points, TDSQL-C for MySQL introduces the AI optimizer. This feature breaks through traditional technical bottlenecks and delivers significant performance improvements in complex analytical scenarios such as TPC-DS. By leveraging the capabilities of Tencent Hunyuan, the AI optimizer can explore hundreds of billions of execution plans and match better ones. This reduces SQL statement execution time and CPU utilization, optimizes slow queries, and achieves automatic database tuning.

Feature Overview

The AI optimizer has the following core capabilities:
Automatic Problem Plan Identification: Intelligently identifies SQL statements with deviated execution plans.
Automatic Optimal Path Exploration: Explores and selects the execution plan with the lowest cost.
Automatic Binding and Execution: Automatically binds the better plan to the SQL statement for execution.
Automatic Tuning: It enables automatic tuning without manual intervention.

Feature Scenarios

Performance optimization for complex query scenarios.
Automatic tuning during POC testing.
Automatic repair of slow query issues.
Optimization and improvement of resource utilization.

Feature Strengths

Ultimate Performance Improvement: In complex analytical scenarios such as TPC-DS, the AI optimizer breaks through traditional technical bottlenecks, significantly improves performance, and reduces SQL access latency.
Zero-Manpower Automatic Tuning: By leveraging the capabilities of Tencent Hunyuan, the optimizer can scale the number of execution plans to billions, automatically explore better paths, and complete tuning for both POC and production environments without manual intervention.
Resource Cost Optimization: By selecting the execution plan with the lowest cost, it effectively reduces CPU and I/O overhead, improves resource utilization, and thereby lowers overall operational costs.

Supported versions for features

This feature is supported by TDSQL-C for MySQL 8.0 clusters with an instance mode of provisioned resources/Serverless and a kernel minor version of 3.1.19.001 or later.

Billing Instructions for Features

The AI optimizer feature is currently free to use, with no feature charges.

Note

When you enable the AI optimizer, the AWR (Automatic Workload Repository) feature is also enabled. The corresponding parameter and its value are automatically set in the background to: txsql_awr_enabled_level = 2. After the AI optimizer is enabled, the corresponding AWR parameter cannot be disabled. If you need to disable it, you must manually configure the parameter.
After you purchase a new instance or enable the AI optimizer, the AI optimizer page for the instance will have a brief period for training and data collection. During this training period, the optimizer gradually learns and optimizes SQL execution plans.

Related Operation Guide

Operation
Documentation Link
Enable AI Optimizer
Describes how to enable the AI optimizer and explains the related fields on the AI optimizer page. For details, see Enable AI Optimizer.
Disabling and Feature Configuration
Describes how to disable the AI optimizer and explains the feature settings on the disable page. For details, see Disable AI Optimizer.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback