View slow query logs in the ApsaraDB for MongoDB console to identify and resolve database performance issues.
Prerequisites
The instance is a replica set instance or a sharded cluster instance.
Limitations
-
Slow query logs are retained for 7 days.
-
ApsaraDB for MongoDB does not support deleting slow query logs.
-
Standalone instances do not support viewing slow query logs due to their architecture.
-
The Logs feature is not available in all regions. Check the console to confirm its availability.
Procedure
-
Go to the Replica Set Instances or Sharded Cluster Instances page. At the top of the page, select a resource group and a region, and then click the ID of the desired instance.
-
In the left-side navigation pane, click .
-
Filter the logs based on your instance type.
-
For a replica set instance
You can filter the query results by database name and time range.
-
For a sharded cluster instance
You can filter the query results by database name, shard node, and time range.
NoteTo download the currently displayed slow query logs, click the
icon in the upper-right corner. -
FAQ
Related topics
To view and export slow query logs, see Slow query logs.