Updated on 2026-06-09 GMT+08:00

Creating a SQL Insights Task

Scenarios

SQL Insights lets you query all SQL logs and analyze, search for, and filter statements from multiple dimensions, 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.
  • SQL Explorer is constrained by the in-memory buffer. In high-traffic scenarios, if the buffer is full, some records may be discarded.
  • If the length of a SQL statement exceeds the value of rds_sql_tracer_max_record_size, the statement is not recorded by default.

    To configure the parameter value, see Modifying Parameters of a DB Instance.

  • After Collect All Query Logs is enabled, the SQL text following FROM in prepared statements is omitted (the statements are displayed as PREPARE xxx FROM ...).

Procedure

  1. Log in to the TaurusDB console.
  2. Click in the upper left corner and select a region and project.
  3. On the Instances page, click the target instance name.
  4. In the navigation pane, choose SQL Analysis and Tuning under DBA Assistant.
  5. Click the SQL Insights tab.

    If Collect All Query Logs is not enabled, the system cannot obtain all SQL data for analysis. To analyze all SQL data, enable this function.

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

  6. Click Create Task.
  7. On the displayed page, set Time Range, Synchronization to Other Instances, Dimension, Username, Keyword, Database, Thread ID, Transaction ID, SQL Type, and Status.

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

    Figure 1 Creating a SQL insights task

  8. Click OK.
  9. 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.