Queries the execution information about an SQL statement, including the execution plan, execution information, resource usage, and self-diagnostics results.
Operation description
For information about the endpoints of AnalyticDB for MySQL, see Endpoints .
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| adb:DescribeDiagnosisSQLInfo | list | *DBClusterLakeVersion acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId} |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| DBClusterId | string | Yes | The cluster ID. Note
You can call the DescribeDBClusters operation to query the IDs of all AnalyticDB for MySQL Data Lakehouse Edition (V3.0) clusters within a region.
| amv-bp1r053byu48p |
| RegionId | string | Yes | The region ID of the cluster. Note
You can call the DescribeRegions operation to query the most recent region list.
| cn-hangzhou |
| ProcessId | string | Yes | The query ID. Note
You can call the DescribeDiagnosisRecords operation to query the diagnostic information about SQL statements for an AnalyticDB for MySQL cluster, including the query ID.
| 2021070216432217201616806503453 |
| ProcessStartTime | long | Yes | The execution start time of the SQL statement. Set the time to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Note
You can call the DescribeDiagnosisRecords operation to query the diagnostic information about SQL statements for an AnalyticDB for MySQL cluster, including the execution start time of the SQL statement.
| 1625215402000 |
| ProcessState | string | Yes | The status of the SQL statement. Valid values:
Note
You can call the DescribeDiagnosisRecords operation to query the diagnostic information about SQL statements for an AnalyticDB for MySQL cluster, including the status of the SQL statement.
| running |
| Lang | string | Yes | The language of file titles and error messages. Valid values:
| zh |
| ProcessRcHost | string | Yes | The IP address and port number of the AnalyticDB for MySQL frontend node on which the SQL statement is executed. Note
You can call the DescribeDiagnosisRecords operation to query the diagnostic information about SQL statements for an AnalyticDB for MySQL Data Lakehouse Edition (V3.0) cluster, including the IP address and port number of the frontend node.
| 192.45.***.***:3145 |
Response parameters
Examples
Sample success responses
JSONformat
{
"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
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2024-01-05 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
| 2022-07-26 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
| 2022-07-26 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
