Slow SQL queries can degrade database stability. When facing high database loads or performance fluctuations, database administrators (DBAs) and developers typically start by checking for slow-running queries. Database Autonomy Service (DAS) collects and analyzes SQL statements that exceed a specified execution time threshold and offers optimization recommendations. This feature helps you quickly identify and resolve performance bottlenecks, improving system stability and reliability.
Background
The database kernel generates slow query logs. The configuration parameters and thresholds vary depending on the database engine. For details, refer to the official documentation for your specific database engine.
Procedure
Log on to the DAS console.
In the navigation pane on the left, click .
Find the target instance and click the instance ID to open the instance details page.
-
In the left-side navigation pane, choose Request Analysis > Slow Logs.
-
Select a time range to view the Slow Log Trend, Event Distribution, Slow Log Statistics, and Slow Log Details.
-
In the Slow Log Trend chart, click a specific point in time to view the corresponding Slow Log Statistics and Slow Log Details.
NoteIf an SQL statement is too long to be fully displayed, hover over it to view the full content in a tooltip.
-
The Event Distribution section lists slow query log events within the specified time range. Click an event to view its details.
-
On the Slow Query Log Statistics and Slow Query Log Details tabs, click the
icon to save the slow query log information to your local computer. -
Click the
icon to open the OpenAPI Explorer with the current parameters pre-filled for API debugging. -
In the Slow Log Statistics section:
-
For a target SQL template, click Details in the Actions column to view the Slow Log Sample for that template.
-
Above the list, select filter criteria to refine the data.
-
-