After you view the basic information for an SQL statement, you can click the SQL text to open the SQL details page. This page displays information based on the SQL diagnosis, such as the SQL text, optimization suggestions, sampling details, diagnosis details, sampling history, execution history, and execution plan.
SQL text
In the SQL text area, you can view the complete SQL text. In the Table schema section, you can view the schema of the corresponding table.

Optimization suggestions
This card does not appear if there are no optimization suggestions.
The Optimization suggestions area displays all issues and corresponding optimization suggestions for the SQL statement that were identified within the diagnosis time range. The system currently provides two types of optimization suggestions:
Plan recommendation
The system analyzes the SQL execution plans from the last week. If an execution plan is found to be significantly better than other similar execution plans (either local or distributed) in terms of CPU time, the system recommends this plan. If a plan is recommended, analyze the differences between it and the existing execution plan. Before you bind the plan, confirm that no Data Definition Language (DDL) changes are involved. After you bind the plan, closely monitor the optimization results. If performance does not improve, roll back the operation immediately.
The specific rules for plan recommendations are as follows:
Plan recommendations are evaluated in tiers based on the CPU time of the latest execution plan. If the CPU time of the latest execution plan is low, only candidate plans that perform significantly better are recommended. If the CPU time of the latest execution plan is high, a candidate plan is recommended even if it is only slightly better.
CPU time of the latest plan
CPU time of the candidate plan
[0-1) ms
1/10 of the CPU time of the latest plan
[1-10) ms
1/5 of the CPU time of the latest plan
[10-100) ms
1/2 of the CPU time of the latest plan
[100-1000) ms
2/3 of the CPU time of the latest plan
[1000-infinity) ms
5/6 of the CPU time of the latest plan
Index recommendation
The specific rules for index recommendations are as follows:
Columns for equality queries come first, in any order.
If there is a range query, the range query column with the best selectivity is placed after the equality query columns.
If there is no range query and the conditions for eliminating sorting are met, the sorting columns are placed after the equality query columns.
Other columns in the predicate are placed after the preceding columns to form a semi-wide index.
Other columns in the SELECT statement are placed after the preceding columns to create a covering index.
If a covering index has no more than 8 columns, it is recommended. Otherwise, a semi-wide index is recommended.
Index recommendations are made only when the CPU time exceeds 10 ms or the response time exceeds 20 ms.

SQL diagnosis details
This card does not appear if there are no diagnosis details.
In the SQL diagnosis details area, you can view the number of times a specific type of issue occurred within the diagnosis time range and the details of the most recent diagnosis. These details include the time range, number of executions, CPU time, and last execution time. Click the triangle icon to view more information, such as the diagnostic basis and troubleshooting suggestions.
SQL sampling details
Sampling details are displayed only if an SQL statement is a slow SQL.
In the SQL sampling details area, you can view sampling details for the current SQL statement. Click the gear icon to set the columns to display. Click Export to download the SQL sampling details.
Aggregated SQL details
Aggregated SQL details are displayed only if you are viewing the details page for an aggregated SQL.
In the Aggregated SQL details area, you can view all related SQL information. Click Manage columns to select the columns to display and adjust their order. Click + to view the most recent error and a summary of errors for the statistics period.

Physical execution plan
On the Physical execution plan tab, the display is different for non-aggregated and aggregated SQL.
Physical execution plan for a non-aggregated SQL
Expand Plan Hash to view the details of the physical execution plan.
On the execution plan details page:
You can view how operators are applied in the execution steps, the server execution plan, and the SQL details that generated the plan. For a basic introduction to operators, see Introduction to SQL execution plans.
Hover over an object name in the execution plan to view information such as the table schema or DDL index information.
If the object name is a table, you can view the table schema.
If the object name is an index, you can view DDL index information.
In the upper-right corner, click Custom to select a preset time range, such as Last 1 hour or Last 12 hours, from the drop-down list, or to set a custom time range. Note that you can only query physical execution plans from the last 15 days.
Click Binding history in last 30 days to view the binding records for physical execution plans within the last 30 days.
Click Refresh plan cache and confirm the action to purge the execution plan cache for the SQL statement in the tenant. The next time this SQL statement is executed, the system will regenerate the execution plan.
Click Bind and confirm the operation to bind the SQL statement to this execution plan. If the execution plan is already bound, Bound is displayed.

Physical execution plan for an aggregated SQL
SQL aggregation summarizes similar SQL statements within a specified range. The list of included SQL statements may vary for different time ranges. Therefore, binding information for the execution plan is not displayed. To view the effectiveness and operation history of an Outline, go to the optimization center.
You can expand Plan Hash to view the physical execution plan details and aggregated SQL details.
On the Execution plan details tab:
You can view how operators are applied in the execution steps, the server execution plan, and the SQL details that generated the plan. For a basic introduction to operators, see Introduction to SQL execution plans.
Hover over an object name in the execution plan to view information such as the table schema or DDL index information.
If the object name is a table, you can view the table schema.

If the object name is an index, you can view DDL index information.
On the Aggregated SQL details tab, you can view a list of aggregated SQL statements, including their SQL text and SQL ID.

In the upper-right corner, click Custom and select a predefined time range from the drop-down list, such as Last 1 hour or Last 12 hours. You can also set a custom time range. Currently, you can only query physical execution plans from the past 15 days.
Click Bind and confirm the action to bind the SQL statement to this execution plan. If the execution plan is already bound, Bound is displayed.
SQL execution history
On the SQL execution history tab, non-aggregated and aggregated SQL are displayed differently.
Execution history for a non-aggregated SQL
You can view the SQL execution history for the last 1 hour, last 12 hours, or a custom time range, along with related charts.
SQL execution history: View the execution history records for the current SQL statement.
Click All nodes and select a node from the drop-down list.
Click Custom time and select Last 1 hour or Last 12 hours from the drop-down list. You can also set a custom time. Note the following limits:
You can only view SQL execution history from the last 15 days.
Minimum range limits:
Within 3 days: The selected time range must be at least 1 minute.
Between 3 and 7 days: The selected time range must be at least 5 minutes.
Over 7 days: The selected time range must be at least 20 minutes.
In the upper-right corner, click the Manage columns icon to select the columns that you want to display.
Click Export to download the SQL execution history.

SQL execution duration chart: Click a category on the right to view the corresponding execution duration information.

Total executions: Click Total executions and select the desired data from the drop-down list.

Execution history for an aggregated SQL
You can view the SQL execution history for the last 1 hour, last 12 hours, or a custom time range, along with related charts.
SQL execution history: View the execution history records for the current SQL statement. In the upper-right corner, click the Manage columns icon to select the columns to display. Click Export to download the SQL execution history.
You can view chart data for an aggregated SQL by the aggregated SQL dimension or the individual SQL dimension.
The aggregated SQL dimension provides statistics on the overall data of all associated SQL statements.
SQL execution duration: From the drop-down list, select a metric such as Total database time, Average duration, or Response time.

Total executions: Click Total executions to select the data to view from the drop-down list.

The individual SQL dimension displays data for the top 10 SQL statements by CPU usage by default. You can follow the prompts to filter for more SQL statements.
SQL execution duration: Select an option from the drop-down list, such as Total database time, Average duration, or Response time. You can also click an SQL ID to view information for a specific SQL statement.

Total executions: Click Total executions to select the data to view from the drop-down list. You can also click an SQL ID to view details about a specific SQL statement.

Table information
On the Table information tab, you can view index information and perform operations such as index binding. If an index is already bound, Bound is displayed. You can also view table statistics information.

Advanced settings
Throttling settings
In the Throttling settings area, click Set throttling.
Enter a value for Maximum number of concurrent executions and click OK.
In the dialog box, click OK.

Keyword-based throttling settings
In the Keyword-based throttling settings area, click Set keyword-based throttling.
On the refreshed page, click Set under Throttling keywords.
In the Set throttling keywords dialog box, enter the throttling keywords and click OK.
NoteYou do not need to enter all keywords. Enter only the keywords that you need. If a keyword is a string that contains spaces, enclose the string in double or single quotation marks.
Set the Maximum number of concurrent executions for keywords and click OK.
NoteThe maximum number of concurrent executions for keywords is an independent setting.
In the dialog box that appears, click OK.
Outline settings
In the Outline settings area, click Set Outline.
Enter the Outline and click OK.
In the dialog box that appears, click OK.









