View the execution details of a specific SQL statement, including its execution plan, runtime information, resource usage, and self-diagnosis results.
Operation description
For more information, see Endpoints.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
adb:DescribeDiagnosisSQLInfo |
list |
*DBClusterLakeVersion
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The cluster ID. Note
Call the DescribeDBClusters operation to query the IDs of AnalyticDB for MySQL clusters in a specific region. |
amv-bp1r053by**** |
| RegionId |
string |
Yes |
The region ID. Note
Call the DescribeRegions operation to query the IDs of regions that AnalyticDB for MySQL supports. |
cn-hangzhou |
| ProcessId |
string |
No |
The query ID. Note
Call the DescribeDiagnosisRecords operation to query the summary information about SQL statements in a specific AnalyticDB for MySQL cluster. The summary information includes the query ID. |
20210702164322172016168**** |
| ProcessStartTime |
integer |
No |
The time when the SQL statement started to run. The time is a UNIX timestamp. Unit: milliseconds (ms). Note
Call the DescribeDiagnosisRecords operation to query the summary information about SQL statements in a specific AnalyticDB for MySQL cluster. The summary information includes the start time of the SQL statement. |
1625215402000 |
| ProcessState |
string |
No |
The state of the SQL statement. Valid values:
Note
Call the DescribeDiagnosisRecords operation to query the summary information about SQL statements in a specific AnalyticDB for MySQL cluster. The summary information includes the state of the SQL statement. |
running |
| Lang |
string |
No |
The language of the downloaded file title and some error messages. Valid values:
|
zh |
| ProcessRcHost |
string |
No |
The IP address and port of the frontend node that runs the SQL statement. Note
Call the DescribeDiagnosisRecords operation to query the summary information about SQL statements in a specific AnalyticDB for MySQL cluster. The summary information includes the IP address and port of the frontend node. |
192.45.***.***:3145 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| DiagnosisSQLInfo |
string |
The execution details of the SQL statement. The details include the SQL statement, statistics, execution plan, and operator information. |
{ "DiagnosisSQLInfo": { "hasSharedStage": false, "resourceGroup": "user_default", "cost": 274, "queuedTime": 0, "outputDataSize": 9, "scheduled": true, "query": "/*+display=tpch_q14*/SELECT 100.00 * SUM(CASE WHEN p_type LIKE 'PROMO%' THEN l_extendedprice * (1 - l_discount) ELSE 0 END) / SUM(l_extendedprice * (1 - l_discount)) AS promo_revenue FROM lineitem l, part p WHERE l_partkey = p_partkey AND l_shipdate >= DATE '1995-09-01' AND l_shipdate < DATE '1995-09-01' + INTERVAL '1' MONTH", "outputRows": 1, "userName": "test_user", "parentId": 0, "maxOutputRows": 200000, "scanSize": 8247470, "peakMemory": 13188295, "startTime": 1626330527632, "state": "FINISHED", "endTime": 1626330527905, "writeTableRows": 0, "scanRows": 351966 } } |
| RequestId |
string |
The request ID. |
1 |
| StageInfos |
array<object> |
The stage-by-stage execution information of the query. |
|
|
object |
The stage-by-stage execution information of the query. |
||
| InputRows |
integer |
The total number of input rows in the stage. |
2341 |
| InputDataSize |
integer |
The total amount of input data in the stage. Unit: bytes. |
2341 |
| OutputRows |
integer |
The total number of output rows in the stage. |
2341 |
| OutputDataSize |
integer |
The total amount of output data in the stage. Unit: bytes. |
2341 |
| PeakMemory |
integer |
The peak memory usage of the stage. Unit: bytes. |
2341 |
| OperatorCost |
integer |
The total time consumed by the operators in the stage. Unit: milliseconds (ms). |
2341 |
| StageId |
string |
The stage ID. |
Stage[26] |
| State |
string |
The stage state. |
RUNNING |
| Progress |
number |
The execution progress of the stage. |
0.3 |
| ExecutionType |
string |
Examples
Success response
JSON format
{
"DiagnosisSQLInfo": "{ \"DiagnosisSQLInfo\": { \"hasSharedStage\": false, \"resourceGroup\": \"user_default\", \"cost\": 274, \"queuedTime\": 0, \"outputDataSize\": 9, \"scheduled\": true, \"query\": \"/*+display=tpch_q14*/SELECT 100.00 * SUM(CASE WHEN p_type LIKE 'PROMO%' THEN l_extendedprice * (1 - l_discount) ELSE 0 END) / SUM(l_extendedprice * (1 - l_discount)) AS promo_revenue FROM lineitem l, part p WHERE l_partkey = p_partkey AND l_shipdate >= DATE '1995-09-01' AND l_shipdate < DATE '1995-09-01' + INTERVAL '1' MONTH\", \"outputRows\": 1, \"userName\": \"test_user\", \"parentId\": 0, \"maxOutputRows\": 200000, \"scanSize\": 8247470, \"peakMemory\": 13188295, \"startTime\": 1626330527632, \"state\": \"FINISHED\", \"endTime\": 1626330527905, \"writeTableRows\": 0, \"scanRows\": 351966 } }",
"RequestId": "1",
"StageInfos": [
{
"InputRows": 2341,
"InputDataSize": 2341,
"OutputRows": 2341,
"OutputDataSize": 2341,
"PeakMemory": 2341,
"OperatorCost": 2341,
"StageId": "Stage[26]",
"State": "RUNNING",
"Progress": 0.3,
"ExecutionType": ""
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.