Queries the metrics of an SQL pattern such as the query duration and average memory usage within a specific period of time.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribePatternPerformance |
The operation that you want to perform. Set the value to DescribePatternPerformance. |
DBClusterId | String | Yes | am-**************** |
The ID of the cluster. Note You can call the DescribeDBClusters operation to query the details of all AnalyticDB for MySQL clusters within a specific
region, including cluster IDs.
|
StartTime | String | Yes | 2021-11-18T00:00:00Z |
The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Note
|
EndTime | String | Yes | 2021-11-18T18:05:00Z |
The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Note The end time must be later than the start time.
|
RegionId | String | Yes | cn-hangzhou |
The ID of the region. Note You can call the DescribeRegions operation to query the regions and zones supported by AnalyticDB for MySQL, including
region IDs.
|
PatternId | String | Yes | 3847585356974****** |
The ID of the SQL pattern. Note You can call the DescribeSQLPatterns operation to query the information of all SQL patterns in an AnalyticDB for MySQL
cluster within a specific period of time, including SQL pattern IDs.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
EndTime | String | 2021-11-18T18:05Z |
The end time of the query. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
RequestId | String | 210f47011634026610213529****** |
The ID of the request. |
StartTime | String | 2021-11-18T00:00Z |
The start time of the query. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
Performances | Array of PerformanceItem |
The performance metrics. |
|
Key | String | AnalyticDB_PatternQueryCount |
The performance metric that was queried. Valid values:
|
Unit | String | ms |
The unit of the performance metric. Valid values:
|
Series | Array of SeriesItem |
Details of the performance metrics. |
|
Values | Array of String | [ "2021-11-18 13:38:00", "224" ] |
The values of the performance metrics. |
Name | String | max_query_time |
The name of the performance metric value. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribePatternPerformance
&DBClusterId=am-****************
&StartTime=2021-11-18T00:00:00Z
&EndTime=2021-11-18T18:05:00Z
&RegionId=cn-hangzhou
&PatternId=3847585356974******
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribePatternPerformanceResponse>
<EndTime>2021-11-18T18:05Z</EndTime>
<RequestId>210f47011634026610213529******</RequestId>
<StartTime>2021-11-18T00:00Z</StartTime>
<Performances>
<Key>AnalyticDB_PatternQueryCount</Key>
<Unit>ms</Unit>
<Series>
<Values>[ "2021-11-18 13:38:00", "224" ]</Values>
<Name>max_query_time</Name>
</Series>
</Performances>
</DescribePatternPerformanceResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"EndTime" : "2021-11-18T18:05Z",
"RequestId" : "210f47011634026610213529******",
"StartTime" : "2021-11-18T00:00Z",
"Performances" : {
"Key" : "AnalyticDB_PatternQueryCount",
"Unit" : "ms",
"Series" : {
"Values" : "[ \"2021-11-18 13:38:00\", \"224\" ]",
"Name" : "max_query_time"
}
}
}
Error codes
For a list of error codes, visit the API Error Center.