tencent cloud

Feedback

Querying and Downloading Slow Query Log

Last updated: 2024-01-18 17:23:30
    The slow query log records the query statements that take more time than the specified value to execute in TencentDB for SQL Server. It enables you to find out inefficient query statements for optimization. Typically, it is a SQL statement for troubleshooting and an important feature for checking the performance of the current TencentDB for SQL Server instance. This document describes how to query and download a slow query log in the console.
    Note:
    The log is stored in the Beijing time zone (UTC+8) by default. If the default time zone is modified, it will be stored in the time zone of the instance server, but its storage time will still be in Beijing time in the console.

    Use Limits

    The collection of slow query is enabled by default and cannot be disabled.
    The collection threshold of slow query is 1s (or 1,000 ms) by default, and SQL executions exceeding 1s will be recorded as a slow query log.
    The slow query logs are collected every 5 minutes by default, and SQL statements exceeding 1s will be recorded.
    The slow query logs are retained for 7 days by default and will be automatically deleted upon expiration.

    Directions

    2. Select the region at the top, find the target instance, and click the instance ID or Manage in the Operation column to enter the instance management page.
    
    3. On the instance management page, select the Operation Log tab > Slow Query Log to see slow log list.
    You can view the following fields: File Name, Start Time of File Generation, End Time of File Generation, File Size, and Operation (Download).
    You can search for slow logs generated in the last 5/15/30 minutes, last 1/3/24 hours, today, yesterday, last 3/7/30 days, or a custom time range.
    
    4. Click Download in the Operation column to download slow query log files.
    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