describe_slow_log_records
Query and retrieve slow log records for Alibaba Cloud RDS instances within a specified time range, filter by SQL statement, database, or node, and manage pagination for detailed performance analysis.
Instructions
Query slow log records for an RDS instance.
Args:
region_id: The region ID of the RDS instance.
dbinstance_id: The ID of the RDS instance.
start_time: Start time in format: yyyy-MM-dd HH:mm.
Cannot be earlier than 30 days before the current time.
end_time: End time in format: yyyy-MM-dd HH:mm.
Must be later than the start time.
sqlhash: The unique identifier of the SQL statement in slow log statistics.
Used to get slow log details for a specific SQL statement.
db_name: The name of the database.
page_size: Number of records per page. Range: 30-100. Default: 30.
page_number: Page number. Must be greater than 0 and not exceed Integer max value. Default: 1.
node_id: Node ID. Only applicable to cluster instances.
If not specified, logs from the primary node are returned by default.
Returns:
Dict[str, Any]: The response containing slow log records.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
db_name | No | ||
dbinstance_id | Yes | ||
end_time | Yes | ||
node_id | No | ||
page_number | No | ||
page_size | No | ||
region_id | Yes | ||
sqlhash | No | ||
start_time | Yes |
Input Schema (JSON Schema)
{
"properties": {
"db_name": {
"default": null,
"title": "Db Name",
"type": "string"
},
"dbinstance_id": {
"title": "Dbinstance Id",
"type": "string"
},
"end_time": {
"title": "End Time",
"type": "string"
},
"node_id": {
"default": null,
"title": "Node Id",
"type": "string"
},
"page_number": {
"default": 1,
"title": "Page Number",
"type": "integer"
},
"page_size": {
"default": 30,
"title": "Page Size",
"type": "integer"
},
"region_id": {
"title": "Region Id",
"type": "string"
},
"sqlhash": {
"default": null,
"title": "Sqlhash",
"type": "string"
},
"start_time": {
"title": "Start Time",
"type": "string"
}
},
"required": [
"region_id",
"dbinstance_id",
"start_time",
"end_time"
],
"title": "describe_slow_log_recordsArguments",
"type": "object"
}