Files
doc-exports/docs/taurusdb/umn/taurusdb_03_0162.html
wangdengke2 78f14b668b taurusdb_umn
Reviewed-by: Wagner, Fabian <fabian.wagner@t-systems.com>
Co-authored-by: wangdengke2 <wangdengke2@huawei.com>
Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
2026-03-11 14:56:23 +00:00

8.7 KiB

Creating a SQL Insights Task

Scenarios

SQL Insights allows you to not only query all executed SQL statements, but also analyze and search for the tables that are accessed and updated most frequently, and the SQL statements that have the longest lock wait, helping you quickly identify exceptions.

Constraints

  • You need to enable Collect All Query Logs before using SQL Insights. Collecting all query logs will reduce instance performance by up to 5%.
  • After Collect All Query Logs is disabled, new SQL statements will not be collected anymore and the collected SQL data will be deleted.
  • Some data cannot be recorded if a buffer overrun occurs.
  • Any SQL statement that exceeds the value of rds_sql_tracer_max_record_size will not be recorded by default.

    To configure the parameter value, see Modifying a Parameter Template.

Procedure

  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, click the instance name.
  5. In the navigation pane, choose DBA Assistant > Historical Diagnosis.
  6. Click SQL Explorer and then SQL Insights.

    Click next to Collect All Query Logs.

    To disable this function, click Log Settings in the upper right corner, toggle off the Collect All Query Logs switch, and click OK.

  7. Click Create Task.

  8. On the displayed page, set Time Range, Synchronization to Other Instances, Username, Keyword, Database, Thread ID, Transaction ID, Dimension, SQL Type, and Execution Status.

    You can set Dimension to Instance or Node. When Node is selected, you can view the SQL logs of deleted nodes.

  9. Click OK.
  10. In the task list, view the SQL Insights task.

    • You can click Details in the Operation column to view the SQL Insights task details.
    • You can click View Sync Tasks in the Operation column to view synchronization task details.
    • You can select a keyword such as Time Range, Username, Keyword, or Database to search for the SQL statements executed on the current instance or node.