Turn on Slow Queries Report in Bytebase
After you enable slow query logs in your database, you can turn on the Slow Queries Report in Bytebase. Only the workspace admin and DBA can turn on/off the Slow Queries Report.
-
Go to the Settings page in Bytebase.
-
Go to the Slow Query tab.
-
Click the Report button to turn on the Slow Queries Report for instances.
If you don't enable slow query logs in your database, you will not be able to turn on the Slow Queries Report and get an error.
View Slow Queries
After you turn on the Slow Queries Report, you can view the slow queries in the Slow Queries page.
You can filter the slow queries by environment, instance, database, and date range. Bytebase orders the slow queries by the maximum execution time in descending order.
Bytebase will sync the slow queries from the database every 12 hours. You can also click the Sync Now button to sync the slow queries immediately. Bytebase only stores the slow queries in the last 30 days. Bytebase will hard delete the slow queries older than 30 days.
Specifically, you can view the Slow Query Detail for each MySQL slow query.