RDS

Products

RDS

Documentation > OpenAPI & SDK > RDS > describeQueryPerformance

describeQueryPerformance

Description

Obtain the information of performance statistics of SQL execution, such as slow SQL, etc. based on user-defined query conditions. Based on this information, users can find and optimize performance bottlenecks related to SQL execution.
- Support SQL Server Only

Request method

POST

Request address

https://rds.jdcloud-api.com/v1/regions/{regionId}/instances/{instanceId}/performance:describeQueryPerformance

Name Type Required or not Default value Description
regionId String True Region code, with range detailed in Regions and Availability Zone Comparison Table
instanceId String True RDS instance ID, which uniquely identifies an RDS instance

Request parameter

Name Type Required or not Default value Description
queryType String True Query Type, Return Results of Fields From High to Low for Different Query Types.
support the following types:
ExecutionCount: Number of executions
LastRows: Number of rows returned last time
ElapsedTime: Average execution time
CPUTime: Average CPU time
LogicalReads: Average logical read
LogicalWrites: Average logical write
PhysicalReads: Average physical read
threshold Integer False Return only records whose query condition is larger than or equal to threshold and the default is 0
pageNumber Integer False The default of the number of the data displayed is 1 and the value range is [-1,1000]. When pageNumber is -1, return all data page numbers; when the total number of pages is exceeded, display the last page.
pageSize Integer False The default of the number of data displayed per page is 50 and the value range is [1,100]. It can only be a multiple of 10 used for the API to query the list.

Response parameter

Name Type Description
result Result

Result

Name Type Description
queryPerformanceResult QueryPerformanceResult[ ] The Result Set of Query Performance Statistics
totalCount Integer Total Number of Records
pageNumber Integer The Page Number of the Current Data
pageSize Integer The Number of Data Displayed Per Page

QueryPerformanceResult

Name Type Description
sql String Sql Statement
lastExecutionTime String Last execution time, format: YYYY-MM-DD hh:mm:ss
elapsedTime Integer Average Execution Time, Unit: Milliseconds (ms)
executionCount Integer Number of Executions
workerTime Integer Average CPU Usage Time, Unit: Milliseconds (ms)
logicalReads Integer Average Logical Reads
logicalWrites Integer Average Logical Writes
physicalReads Integer Average Physical Reads
lastRows Integer Number of Records in Last Return

Response code

Return code Description
200 OK
Update Time:2019-07-11 18:54:32