All Products
Search
Document Center

AnalyticDB:DescribeDiagnosisSQLInfo

Last Updated:Jan 08, 2026

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

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
RegionIdstringYes

The region ID of the cluster.

Note You can call the DescribeRegions operation to query the most recent region list.
cn-hangzhou
ProcessIdstringYes

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
ProcessStartTimelongYes

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
ProcessStatestringYes

The status of the SQL statement. Valid values:

  • running
  • finished
  • failed
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
LangstringYes

The language of file titles and error messages. Valid values:

  • zh: simplified Chinese.
  • en: English.
  • ja: Japanese.
  • zh-tw: traditional Chinese.
zh
ProcessRcHoststringYes

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

ParameterTypeDescriptionExample
object
DiagnosisSQLInfostring

The queried execution information, including 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 } }
RequestIdstring

The request ID.

1
StageInfosarray<object>

The queried execution information by stage.

StageInfosobject
InputRowslong

The total number of input rows in the stage.

2341
InputDataSizelong

The total amount of input data in the stage. Unit: bytes.

2341
OutputRowslong

The total number of output rows in the stage.

2341
OutputDataSizelong

The total amount of output data in the stage. Unit: bytes.

2341
PeakMemorylong

The total peak memory of the stage. Unit: bytes.

2341
OperatorCostlong

The total amount of time consumed by all operators in the stage. Unit: milliseconds.

2341
StageIdstring

The stage ID.

Stage[26]
Statestring

The state of the stage.

RUNNING
Progressdouble

The execution progress of the stage.

0.3

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 &gt;= DATE '1995-09-01' AND l_shipdate &lt; 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 timeSummary of changesOperation
2024-01-05The internal configuration of the API is changed, but the call is not affectedView Change Details
2022-07-26The internal configuration of the API is changed, but the call is not affectedView Change Details
2022-07-26The internal configuration of the API is changed, but the call is not affectedView Change Details