Queries the execution information about an SQL statement, including the execution plan, execution information, resource usage, and self-diagnostics results.
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:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is 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 | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBClusterId | string | Yes | The ID of the cluster. Note
You can call the DescribeDBClusters operation to query the cluster IDs of all AnalyticDB for MySQL Data Warehouse Edition clusters within a specific region.
| am-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 ID of the query. Note
You can call the DescribeDiagnosisRecords operation to query the SQL summary information of a specified AnalyticDB for MySQL cluster, including the query ID.
| 2021070216432217201616806503453****** |
ProcessStartTime | long | Yes | The execution start time of the SQL statement. Specify the time in the UNIX timestamp format. Unit: milliseconds. Note
You can call the DescribeDiagnosisRecords operation to query the SQL summary information of a specified AnalyticDB for MySQL cluster, including the execution start time of the SQL statement.
| 1625215402000 |
ProcessState | string | Yes | The state of the SQL statement. Valid values:
Note
You can call the DescribeDiagnosisRecords operation to query the SQL summary information of a specified AnalyticDB for MySQL cluster, including the state 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 SQL summary information of a specified AnalyticDB for MySQL cluster, including the IP address and port number of the frontend node.
| 192.45.***.***:3145 |
Response parameters
Examples
Sample success responses
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": 123,
"InputDataSize": 2341,
"OutputRows": 231,
"OutputDataSize": 12344,
"PeakMemory": 3421,
"OperatorCost": 2341,
"StageId": "Stage[26]",
"State": "RUNNING",
"Progress": 0.3
}
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-08-31 | The internal configuration of the API is changed, but the call is not affected | View Change Details |