Slow queries decrease the stability of ApsaraDB for Redis instances. You can view detailed information about the slow log in CloudDBA to monitor and analyze slow queries.

Prerequisites

The instance is of Community Edition or Enhanced Edition (Performance-enhanced instances).

Procedure

  1. Log on to the ApsaraDB for Redis console.
  2. On the top of the page, select the region where the instance is deployed.
  3. On the Instance List page, click the Instance ID of the instance.
  4. In the left-side navigation pane, choose CloudDBA > Slow Queries.
  5. On the slow log details page, you can view Current Log and Log Trend.
    redis-clouddba-slow queries
    • Current Log

      By default, all slow log entries are displayed. You can enter a keyword in the search box to filter slow log entries.

      Note If you want to analyze the slow log on your on-premises machine, you can click Export in the upper-right corner.
    • Log Trend
      Note If you are using this feature for the first time, click Enable Slow Log Analysis.

      In the Slow Log Trend section, you can view the number of slow log entries within a specified period of time for an instance.

      In the Slow Log Statistics section, you can view information about the command type, number of times that the command is executed, and the average time that is consumed to run the command. Click Sample to view the details of a specific command.