All Products
Search
Document Center

AnalyticDB:DescribeDiagnosisMonitorPerformance

Last Updated:Nov 05, 2025

Queries the details of query execution on an AnalyticDB for PostgreSQL instance.

Operation description

You can call this operation to query the details of query execution on an AnalyticDB for PostgreSQL instance in elastic storage mode within a specified time range.

Limits

You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

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

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 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.
OperationAccess levelResource typeCondition keyAssociated operation
gpdb:DescribeDiagnosisMonitorPerformanceget
*DBInstance
acs:gpdb:*:{#accountId}:dbinstance/{#DBInstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The ID of the instance.

Note You can call the DescribeDBInstances operation to query the details of all AnalyticDB for PostgreSQL instances in a specific region, including instance IDs.
gp-bp12ga6v69h86****
StartTimestringNo

The beginning of the time range to query. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC.

2022-05-07T06:59Z
EndTimestringNo

The end of the time range to query. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. The end time must be later than the start time.

2022-05-07T07:59Z
UserstringNo

The name of the database account.

adbpguser
DatabasestringYes

The name of the database.

adbtest
QueryConditionstringNo

The filter condition on queries. Specify the value in the JSON format. Valid values:

  • {"Type":"maxCost", "Value":"100"}: filters the top 100 queries that are the most time-consuming.

  • {"Type":"status","Value":"finished"}: filters completed queries.

  • {"Type":"status","Value":"running"}: filters running queries.

  • {"Type":"cost","Min":"30","Max":"50"}: filters the queries that consume 30 milliseconds or more and less than 50 milliseconds. You can customize a filter condition by setting Min and Max.

    • If only Min is specified, the queries that consume a period of time that is greater than or equal to the Min value are filtered.
    • If only Max is specified, the queries that consume a period of time that is less than the Max value are filtered.
    • If both Min and Max are specified, the queries that consume a period of time that is greater than or equal to the Min value and less than the Max value are filtered.
{"Type":"maxCost", "Value":"100"}

Response parameters

ParameterTypeDescriptionExample
object
Performancesarray<object>

Details of query execution.

Itemobject
QueryIDstring

The ID of the query. It is a unique identifier of the query.

2022042612465401000000012903151998970
StartTimelong

The start time of the query. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

1651877940000
Costinteger

The execution duration of the query. Unit: milliseconds.

1
Statusstring

The execution state of the query. Valid values:

  • running: The query is being executed.
  • finished: The query is complete.
finished
Userstring

The name of the database account.

adbpguser
Databasestring

The name of the database.

adbtest
RequestIdstring

The ID of the request.

B4CAF581-2AC7-41AD-8940-D56DF7AADF5B
PerformancesThresholdinteger

The threshold for the number of queries.

10000
PerformancesTruncatedboolean

Indicates whether the queries are truncated when the number of queries exceeds the threshold. Valid values:

  • true: The queries are truncated.
  • false: The queries are not truncated.
false

Examples

Sample success responses

JSONformat

{
  "Performances": [
    {
      "QueryID": 2.022042612465401e+36,
      "StartTime": 1651877940000,
      "Cost": 1,
      "Status": "finished",
      "User": "adbpguser",
      "Database": "adbtest"
    }
  ],
  "RequestId": "B4CAF581-2AC7-41AD-8940-D56DF7AADF5B",
  "PerformancesThreshold": 10000,
  "PerformancesTruncated": false
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history