Slow logs are often used as the basis for optimizing business operations in MongoDB. For more information on slow logs, please see Database Profiler. You can query slow logs in the TencentDB for MongoDB Console.
- The system logs operations with an execution time of more than 100 ms.
- The slow logs are retained for 7 days. You are recommended to limit the query time range within 1 day.
- Only the first 10,000 slow logs can be queried. If the query is slow, you can narrow down the query time range.
Log in to the TencentDB for MongoDB Console and click an instance name to enter the instance management page. Select Database Management > Slow Log Query.
The system provides two query methods as described below:
The statistics query result contains four fields:
commandtype as the aggregation dimension. You mainly need to refer to the
commandtype when troubleshooting problems.
A details query result contains three fields: