tencent cloud

Feedback

Slow Log

Last updated: 2023-11-15 17:57:01

    Overview

    A slow query is defined as a query statement that takes more time than the specified value, and the statement is called a slow query statement. The slow log analysis feature of TencentDB for Redis offers slow logs in two dimensions: instance and proxy.
    In the instance (Redis database instance) dimension, you can clearly view the CPU utilization, number of slow queries, consumed time statistics by log segment, and information of the entire slow log list.
    In the proxy (middleware cluster node) dimension, you can view the proxy's slow log statistics, consumed time statistics by segment, and details of the slow log list.
    Slow log analysis is often used as an important basis for database performance optimization. DBbrain is a cloud database autonomy service provided by Tencent Cloud for database performance optimization, security, and management, and the slow logs of TencentDB for Redis are connected to it for statistical analysis.

    Billing Details

    The slow log analysis feature of DBbrain is currently in beta test and free of charge. For more information, see Purchase Guide.

    Note

    Redis Slow Log operations with an execution time of 1 ms, 5 ms, 10 ms, 20 ms, 40 ms, and 50 ms.
    Proxy Slow Log operations with an execution time of 10 ms, 20 ms, 40 ms, and 50 ms.
    The slow logs are retained for 15 days.
    A default account can perform up to 15,000 queries per second, while a custom account can perform up to 20 queries per second.
    If the query is slow, you can narrow down the query time period.

    Prerequisites

    You have created a TencentDB for Redis instance. For more information, see Creating TencentDB for Redis Instance.
    The database instance is in Running status.

    Directions

    Querying slow logs

    1. Log in to the TencentDB for Redis console.
    2. Above the Instance List on the right, select the region.
    3. In the instance list, find the target instance.
    4. Click the target instance ID to enter the Instance Details page.
    5. Click the Slow Log tab to enter the Redis Slow Log page. To query the slow logs generated by the proxy, select the Proxy Slow Log tab.
    6. Select the time period after Query Time Period, select the threshold for command request duration from the drop-down list after Average Execution Duration (> ms), click Query, and slow logs within the time period will be displayed.
    

    Related Operations

    Exporting slow log

    1. Click Export in the top-right corner of the Redis Slow Log or Proxy Slow Log page.
    
    2. In the pop-up window, view the limit on the number of slow logs that can be exported at a time, and click Export.
    3. Open the exported slow logs in Excel.

    Analyzing slow log

    1. Click Slow Log Analysis in the top-right corner of the Redis Slow Log or Proxy Slow Log tab.
    2. On DBbrain > Slow Log Analysis > Performance Optimization, select the query time period, and view the slow log information at the instance level or proxy level as needed. For more analysis, see Slow Log Analysis.
    

    Related APIs

    API Name
    Description
    Queries the slow logs of an instance
    Queries the slow queries of proxy
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support