All Products
Search
Document Center

AnalyticDB:DescribePatternPerformance

Last Updated:Mar 17, 2026

View performance metrics for SQL patterns in a cluster over a specified time range. Metrics include query time and average memory consumption.

Operation description

For the current service endpoint, see service endpoint.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

adb:DescribePatternPerformance

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

DBClusterId

string

Yes

The ID of the cluster.

Note

To view details of all clusters in a region, including their IDs, call the DescribeDBClusters operation.

amv-uf6li1r3do8m****

StartTime

string

No

The start time of the query. Specify the time in UTC using the format yyyy-MM-ddTHH:mm:ssZ.

Note
  • Data is available starting from August 9, 2022 (UTC time: 2022-08-08T16:00:00Z), which corresponds to August 22, 2022 in Beijing time (UTC+8). If you specify a start time earlier than August 9, 2022 (UTC time: 2022-08-08T16:00:00Z), the response is empty.

  • The time range between the start time and end time must not exceed 24 hours.

2022-08-21T02:15:00Z

EndTime

string

No

The end time of the query. Specify the time in UTC using the format yyyy-MM-ddTHH:mmZ.

Note

The end time must be later than the start time.

2022-08-22T01:06:00Z

RegionId

string

Yes

The ID of the region.

cn-hangzhou

PatternId

string

No

The ID of the SQL pattern.

Note

To view a list of SQL patterns in a cluster during a specified time range, including their IDs, call the DescribeSQLPatterns operation.

3847585356974******

Response elements

Element

Type

Description

Example

object

EndTime

string

The end time of the query. Specify the time in UTC using the format yyyy-MM-ddTHH:mmZ.

2022-08-22T01:06:00Z

RequestId

string

The ID of the request.

F21AF487-B8C9-57E0-8E3A-A92BC3611FB6

StartTime

string

The start time of the query. Specify the time in UTC using the format yyyy-MM-ddTHH:mmZ.

2022-08-21T02:15:00Z

Performances

array<object>

Details.

array<object>

List.

Key

string

The performance metric. Valid values:

  • AnalyticDB_PatternQueryCount: The total number of queries for the pattern.

  • AnalyticDB_PatternQueryTime: The total query time for the pattern.

  • AnalyticDB_PatternExecutionTime: The execution duration for queries of the pattern.

  • AnalyticDB_PatternPeakMemory: The peak memory usage for queries of the pattern.

  • AnalyticDB_PatternScanSize: The data volume read by queries of the pattern.

AnalyticDB_PatternExecutionTime

Unit

string

The unit of the performance metric. Valid values:

  • If Key is AnalyticDB_PatternQueryTime or AnalyticDB_PatternExecutionTime, the value is ms.

  • If Key is AnalyticDB_PatternPeakMemory, the value is MB.

  • If Key is AnalyticDB_PatternScanSize, the value is MB.

  • If Key is AnalyticDB_PatternQueryCount, the value is empty.

ms

Series

array<object>

Details of performance values for the metric.

object

List item.

Values

array

List of performance values.

string

Detailed performance values at different timestamps.

[ "2021-11-18 13:38:00", "224" ]

Name

string

The name of the performance value. Valid values:

  • If Key is AnalyticDB_PatternQueryCount, the value is pattern_query_count. This indicates the number of times that SQL statements for the pattern were executed.

  • If Key is AnalyticDB_PatternQueryTime, the value is one of the following:
    • average_query_time: The average total query time for SQL statements of the pattern.

    • max_query_time: The maximum total query time for SQL statements of the pattern.

  • If Key is AnalyticDB_PatternExecutionTime, the value is one of the following:
    • average_execution_time: The average execution duration for SQL statements of the pattern.

    • max_execution_time: The maximum execution duration for SQL statements of the pattern.

  • If Key is AnalyticDB_PatternPeakMemory, the value is one of the following:
    • average_peak_memory: The average peak memory usage for SQL statements of the pattern.

    • max_peak_memory: The maximum peak memory usage for SQL statements of the pattern.

  • If Key is AnalyticDB_PatternScanSize, the value is one of the following:
    • average_scan_size: The average data volume read by SQL statements of the pattern.

    • max_scan_size: The maximum data volume read by SQL statements of the pattern.

max_query_time

User

string

AccessIp

string

SQLPattern

string

Tables

string

FailedCount

integer

QueryCount

integer

Examples

Success response

JSON format

{
  "EndTime": "2022-08-22T01:06:00Z",
  "RequestId": "F21AF487-B8C9-57E0-8E3A-A92BC3611FB6",
  "StartTime": "2022-08-21T02:15:00Z",
  "Performances": [
    {
      "Key": "AnalyticDB_PatternExecutionTime",
      "Unit": "ms",
      "Series": [
        {
          "Values": [
            "[               \"2021-11-18 13:38:00\",               \"224\"             ]"
          ],
          "Name": "max_query_time"
        }
      ]
    }
  ],
  "User": "",
  "AccessIp": "",
  "SQLPattern": "",
  "Tables": "",
  "FailedCount": 0,
  "QueryCount": 0
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.