DescribeProfile

Updated at:

Retrieves the Profile analysis for a query.

Operation description

We recommend using the visual interface to run a query and obtain its QueryID. For more information, see query audit.

Important

Version limitations

  • Version 3.0 is not supported.

  • This feature is not available for instances created before 2025-08-01. To enable this feature for an older instance, please submit a ticket.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

DBInstanceId

string

Yes

The instance ID.

selectdb-cn-7213cjv****

RegionId

string

Yes

The region ID.

cn-beijing

QueryId

string

No

The query ID.

sq202510231018sh3b69ad10014154

Response elements

Element

Type

Description

Example

object

The returned data.

RequestId

string

The request ID.

F8900A96-67F7-5274-A41B-7722E1ECF8C9

Profile

string

The profile text. This parameter is not yet supported.

No Demo

ProfileSummary

any

The profile summary.

{ "summary": { "workloadGroup": "normal", "totalTime": "16ms", "totalTimeMs": 16, "state": "OK", "queryId": "8c7776d539f2426b-b0b654c7acc9bf8f", "sql": "SELECT * FROM demo_db.user_info WHERE status = 1" }, "operators": [ { "pipeline": 0, "frag": 0, "skewRatio": 1, "name": "RESULT_SINK_OPERATOR", "timePct": 0.34, "inputRows": 4, "execTimeAvgMs": 0.05 }, { "pipeline": 0, "frag": 0, "name": "OLAP_SCAN_OPERATOR(nereids_id=84. table_name=user_info(user_info))", "timePct": 0, "runtimeFilters": [ "RuntimeFilterInfo: sum , avg , max , min" ], "execTimeAvgMs": 0, "table": "demo_db.user_info" } ], "queryStats": { "blockedOperators": 0, "operatorCount": 2, "spilledOperators": 0, "fragmentCount": 2 }, "fragments": [ { "pipelines": 1, "instances": 1, "execTimeMs": 0.05, "id": 0 }, { "pipelines": 0, "instances": 0, "execTimeMs": 0, "id": 0 } ], "timeBreakdown": { "schedule": "4ms", "parseSql": "1ms", "nereidsAnalysis": "1ms", "waitFetchResult": "5ms", "fetchResult": "1ms", "nereidsOptimize": "N/A", "plan": "6ms", "nereidsRewrite": "1ms" }, "scannedTables": { "demoDb.userInfo": { "totalSizeGb": 0, "totalRows": 5, "tabletSkew": 1.6, "ddl": "CREATE TABLE `user_info` xxx", "tablets": 8 } } }

Examples

Success response

JSON format

{
  "RequestId": "F8900A96-67F7-5274-A41B-7722E1ECF8C9",
  "Profile": "No Demo",
  "ProfileSummary": "{\n    \"summary\": {\n      \"workloadGroup\": \"normal\",\n      \"totalTime\": \"16ms\",\n      \"totalTimeMs\": 16,\n      \"state\": \"OK\",\n      \"queryId\": \"8c7776d539f2426b-b0b654c7acc9bf8f\",\n      \"sql\": \"SELECT * FROM demo_db.user_info WHERE status = 1\"\n    },\n    \"operators\": [\n      {\n        \"pipeline\": 0,\n        \"frag\": 0,\n        \"skewRatio\": 1,\n        \"name\": \"RESULT_SINK_OPERATOR\",\n        \"timePct\": 0.34,\n        \"inputRows\": 4,\n        \"execTimeAvgMs\": 0.05\n      },\n      {\n        \"pipeline\": 0,\n        \"frag\": 0,\n        \"name\": \"OLAP_SCAN_OPERATOR(nereids_id=84. table_name=user_info(user_info))\",\n        \"timePct\": 0,\n        \"runtimeFilters\": [\n          \"RuntimeFilterInfo: sum , avg , max , min\"\n        ],\n        \"execTimeAvgMs\": 0,\n        \"table\": \"demo_db.user_info\"\n      }\n    ],\n    \"queryStats\": {\n      \"blockedOperators\": 0,\n      \"operatorCount\": 2,\n      \"spilledOperators\": 0,\n      \"fragmentCount\": 2\n    },\n    \"fragments\": [\n      {\n        \"pipelines\": 1,\n        \"instances\": 1,\n        \"execTimeMs\": 0.05,\n        \"id\": 0\n      },\n      {\n        \"pipelines\": 0,\n        \"instances\": 0,\n        \"execTimeMs\": 0,\n        \"id\": 0\n      }\n    ],\n    \"timeBreakdown\": {\n      \"schedule\": \"4ms\",\n      \"parseSql\": \"1ms\",\n      \"nereidsAnalysis\": \"1ms\",\n      \"waitFetchResult\": \"5ms\",\n      \"fetchResult\": \"1ms\",\n      \"nereidsOptimize\": \"N/A\",\n      \"plan\": \"6ms\",\n      \"nereidsRewrite\": \"1ms\"\n    },\n    \"scannedTables\": {\n      \"demoDb.userInfo\": {\n        \"totalSizeGb\": 0,\n        \"totalRows\": 5,\n        \"tabletSkew\": 1.6,\n        \"ddl\": \"CREATE TABLE `user_info` xxx\",\n        \"tablets\": 8\n      }\n    }\n  }"
}

Error codes

HTTP status code

Error code

Error message

Description

400 DocumentConvertFailed.ExceedFileSizeLimit The conversion has been failed, exceed file size limit. english description1
400 Forbidden User not authorized to operate on the specified resource, or this API does not support RAM. english description1
400 InvalidDBName The specified database name is not allowed. english description1
400 CreateOrderFailed Failed to create order. Failed to create order.
400 InvalidDBInstanceId.Malformed The specified parameter "DBInstanceId" is not valid. The parameter "DBInstanceId" is illegal.
400 InvalidParameter Specified parameter is not valid. Specified parameter is not valid.
400 InvalidParameter.QueryId Specified parameters is not valid. Specified parameters is not valid.
403 DBClusterNotSupported The requested operation can not be performed while the cluster is not sale. The requested operation cannot be performed while the cluster is not running.
403 IncorrectDBInstanceState Current DB instance state does not support this operation. english description1
403 InstanceEngineType.NotSupport The instance engine and type does not support operations. english description1
403 InvalidDBInstanceState.NotSupport The specified instance state does't support this operation. The instance is in a state that does not support the current operation.
403 MoneyLessThan100 The Account Monet less Than 100. english description1
403 OperationDenied.DBNameAndAccountPrivilegeCount The operation is not permitted due to count of database or account privilege. english description1
403 InsufficientResourceCapacity The resource is out of usage. Not enough resources, please try again later.
403 IncorrectMinorVersion Current engine minor version does not support operations. Current engine minor version does not support operations.
403 IncorrectEngineVersion Current engine version does not support operations. Current engine version does not support operations.
404 DBInstanceLocked The current instance lock mode does not support this operation. english description1
404 IncorrectVswitchId The specified parameter VSwitchId is not valid. english description1
404 InvalidApi.NotFound Specified api is not found, please check your url and method.
404 InvalidDBInstance.NotFound The specified instance is not found. english description1
404 InvalidDBInstanceClass.NotFound The specified instance classic does not exist. english description1
404 InvalidRegionId.NotFound The provided RegionId does not exist in our records. english description1
404 QueryPrice.Failed The inquiry failed. Contact Alibaba Cloud customer service representatives. english description1
404 InvalidDBInstanceId.NotFound The DBInstanceId provided does not exist in our records. Instance does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.