describe_slow_log_records
Query slow log records from Alibaba Cloud RDS instances to identify performance bottlenecks and optimize database queries.
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
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region_id | Yes | ||
| dbinstance_id | Yes | ||
| start_time | Yes | ||
| end_time | Yes | ||
| sqlhash | No | ||
| db_name | No | ||
| page_size | No | ||
| page_number | No | ||
| node_id | No |