Updated on 2022-02-22 GMT+08:00

Slow Query Log

Scenarios

Slow query logs record statements whose execution period exceeds the value of operationProfiling.slowOpThresholdMs (100 ms by default). With slow query logs, you can identify and optimize slowly executed statements.

Procedure

  1. Log in to the DDS console.
  2. On the Instance Management page, click the target DB instance.
  3. In the navigation pane on the left, click Slow Query Logs.
  4. On the Slow Query Logs page, set search criteria and click Search to view log information.

    • Log records of all shards of a cluster instance
    • Log records of all nodes of a replica set instance
    • Slow query logs of a node in different time periods
    • Slow query statements of the following level
      • All statement type
      • INSERT
      • QUERY
      • UPDATE
      • REMOVE
      • GETMORE
      • COMMAND
      • KILLCURSORS