Queries the performance metrics of an SQL pattern, such as query duration and average memory usage, within a specified time range.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
adb:DescribePatternPerformance |
get |
DBCluster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The cluster ID. Note
Call DescribeDBClusters to query cluster IDs. |
am-**************** |
| StartTime |
string |
Yes |
The start of the time range to query. Format: yyyy-MM-ddTHH:mm:ssZ (UTC, ISO 8601). Note
|
2021-11-18T00:00:00Z |
| EndTime |
string |
Yes |
The end of the time range to query. Format: yyyy-MM-ddTHH:mm:ssZ (UTC, ISO 8601). Note
The end time must be later than the start time. |
2021-11-18T18:05:00Z |
| RegionId |
string |
Yes |
The region ID of the cluster. Note
Call DescribeRegions to query available regions. |
cn-hangzhou |
| PatternId |
string |
Yes |
The SQL pattern ID. Note
Call DescribeSQLPatterns to query SQL pattern IDs. |
3847585356974****** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| EndTime |
string |
The end time of the query. Format: yyyy-MM-ddTHH:mm:ssZ (UTC). |
2021-11-18T18:05Z |
| RequestId |
string |
The request ID. |
210f47011634026610213529****** |
| StartTime |
string |
The start time of the query. Format: yyyy-MM-ddTHH:mm:ssZ (UTC). |
2021-11-18T00:00Z |
| Performances |
array<object> |
The queried performance metrics. |
|
|
array<object> |
The queried performance metric. |
||
| Key |
string |
The performance metric. Valid values:
|
AnalyticDB_PatternQueryCount |
| Unit |
string |
The unit of the performance metric. Valid values:
|
ms |
| Series |
array<object> |
The queried performance metrics. |
|
|
object |
The queried performance metrics. |
||
| Values |
array |
The queried performance metrics. |
|
|
string |
The value of the performance metric. |
[ "2021-11-18 13:38:00", "224" ] |
|
| Name |
string |
The name of the metric value. Valid values:
|
max_query_time |
| AccessIp |
string |
The IP address of the client that submitted the SQL pattern. |
172.16.14.* |
| FailedCount |
integer |
The number of failed queries for the SQL pattern within the time range. |
0 |
| QueryCount |
integer |
The total number of queries for the SQL pattern within the time range. |
35018 |
| SQLPattern |
string |
The SQL statement representing the SQL pattern. |
SELECT *nFROM HIVE.`ADB_EXTERNAL_TPCH_10GB`.`External_customer`nLIMIT ? |
| Tables |
string |
The tables associated with the SQL pattern. |
tpch_1g.part;tpch_1g.supplier;tpch_1g.lineitem;tpch_1g.partsupp;tpch_1g.orders;tpch_1g.nation |
| User |
string |
The database account used to execute the SQL statements. |
test |
Examples
Success response
JSON format
{
"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"
}
]
}
],
"AccessIp": "172.16.14.*",
"FailedCount": 0,
"QueryCount": 35018,
"SQLPattern": "SELECT *nFROM HIVE.`ADB_EXTERNAL_TPCH_10GB`.`External_customer`nLIMIT ?",
"Tables": "tpch_1g.part;tpch_1g.supplier;tpch_1g.lineitem;tpch_1g.partsupp;tpch_1g.orders;tpch_1g.nation",
"User": "test"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.