Querying Real-Time Statistics of Killing Sessions (RDS for MySQL)
Function
This API is used to query real-time statistics of a DB instance's killing sessions.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
Authorization Information
- If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
rds:instance:listAll |
read |
- |
- |
rds:instance:list |
- |
Constraints
- This API is only available for MySQL.
- To use this API, submit a service ticket.
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Constraints
The value cannot be empty.
Range
N/A
Default Value
N/A
instance_id
Yes
Definition
Instance ID, which uniquely identifies an instance.
Constraints
N/A
Range
The value can contain 36 characters. Only letters and digits are allowed.
Default Value
N/A
Table 2 Parameters Parameter
Mandatory
Type
Description
node_id
No
String
Definition
Node ID.
Constraints
This parameter is valid only for cluster instances.
Range
N/A
Default Value
N/A
Request
None
Example Request
Query real-time statistics of killing sessions of a DB instance.
GET https://{Endpoint}/v3/54623db08b174c858ba779d2aa7923a3/instances/aa650a108f034e83b24486fd1ff7be2fin01/ops/intelligent-kill-session/statistic
Response
- Normal response
Table 3 Parameters Parameter
Type
Description
statistics
Array of objects
Definition
Statistics based on different policies.
For details, see Table 4.
Table 4 statistics element structure description Parameter
Type
Description
keyword
String
Definition
Throttling keyword extracted based on a statistics policy.
Range
N/A
raw_sql
String
Definition
Example SQL statement that matches the SQL throttling keyword.
Range
N/A
ids
Array of longs
Definition
IDs of threads that meet the statistics policy.
Range
N/A
count
Integer
Definition
Total number of the thread IDs.
Range
N/A
total_time
Double
Definition
Total execution time of the threads.
Range
N/A
avg_time
Double
Definition
Average execution time of the threads.
Range
N/A
max_time
Double
Definition
Maximum execution time of the threads.
Range
N/A
strategy
String
Definition
Statistics policy.
Range
- top3_time: top 3 execution durations
- top3_count: top 3 occurrence times
- top3_avg_time: top 3 average execution durations
advice_concurrency
Integer
Definition
Recommended maximum concurrency.
Range
N/A
- Example normal response
{ "statistics": [ { "keyword": "SELECT~FROM~table~WHERE~id", "raw_sql_text": "select *from db1", "ids": [ 123, 124, 125, 126 ], "count": 4, "total_time": 14, "avg_time": 3.5, "max_time": 5, "strategy": "top3_average", "advice_concurrency": "5" } ] } - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot