Configuring your database to monitor slow SQL queries with Database Insights for Amazon Aurora
To monitor slow SQL queries for your database, you can use the Slow SQL Queries section in the Database Insights dashboard. Before configuring your database to monitor slow SQL queries, the Slow SQL Queries section is blank.
For more information about monitoring slow SQL queries in the Database Insights dashboard, see Viewing the Database Instance Dashboard for CloudWatch Database Insights in the Amazon CloudWatch User Guide.
To configure your database to monitor slow SQL queries with Database Insights, complete the following steps:
Enable log exports to CloudWatch Logs.
Create or modify the DB cluster parameter group for your DB cluster.
For information about configuring log exports, see Publishing database logs to Amazon CloudWatch Logs in the Amazon Aurora User Guide.
To create or modify your DB cluster parameter group, see the following topics.
Note
For Aurora MySQL, you can configure the parameter long_query_time
with 1‐microsecond granularity. For example, you can set this parameter to 0.000001
. Depending on the amount of queries on the DB instance, the value of the parameter long_query_time
can reduce performance. Start with the value 1.0
, and adjust it based on your workload. When you set this parameter to 0
, Database Insights logs all queries.
For information about Aurora MySQL and Aurora PostgreSQL logs, see the following.