Help Center/ TaurusDB/ User Guide/ HTAP Analysis (Standard Edition)/ Log Management/ Viewing Slow Query Logs of a Standard HTAP Instance
Updated on 2025-08-21 GMT+08:00

Viewing Slow Query Logs of a Standard HTAP Instance

Scenarios

Slow query logs record statements that exceed slowlog_query_duration_ms (5 seconds by default). You can view log details and statistics to identify slow statements, so you can optimize them.

Viewing Log Details

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > TaurusDB.
  4. On the Instances page, locate a TaurusDB instance and click its name to access the Basic Information page.
  5. In the navigation pane, choose HTAP Analysis.
  6. Click the name of an HTAP instance to access the Basic Information page.
  7. In the navigation pane, choose Logs.
  8. On the Slow Query Logs tab, view the slow query log details.
  9. View slow query logs of different nodes and SQL statements in a given database.

    Figure 1 Viewing slow query logs

    • Enabling Show Original Log

      To show slow query logs in plaintext, click next to Show Original Log. In the displayed dialog box, click OK.

      Original logs will be automatically deleted 30 days later. If the instance is deleted, its logs are also deleted.

      Figure 2 Enabling Show Original Log

    • Viewing slow query logs

      View slow query logs of different nodes and SQL statements in a given database. You can view slow query logs generated in the last 15 minutes, last 30 minutes, last hour, last 24 hours, last 7 days, last 30 days, or a custom time range.

      Supported SQL statements include SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, and DROP.

Reporting Slow Logs to LTS

After this function is enabled, logs record all requests sent to your instance and are stored in LTS. Once enabled, there is a delay of approximately 10 minutes before the changes are applied.

You will be billed for this function. For pricing details, see Billing.

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > TaurusDB.
  4. On the Instances page, locate a TaurusDB instance and click its name to access the Basic Information page.
  5. In the navigation pane, choose HTAP Analysis.
  6. Click the name of an HTAP instance to access the Basic Information page.
  7. In the navigation pane, choose Logs.
  8. On the Slow Query Logs tab, click next to Report Slow Logs to LTS.

    Figure 3 Reporting slow logs to LTS

  9. In the displayed dialog box, specify Log Group and Log Stream and click OK.

    Figure 4 Reporting slow logs to LTS