Files
doc-exports/docs/rds/umn/rds_pg_08_0032.html
wangdengke2 64672e58fb rds_umn
Reviewed-by: Wagner, Fabian <fabian.wagner@t-systems.com>
Co-authored-by: wangdengke2 <wangdengke2@huawei.com>
Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
2025-09-19 08:45:25 +00:00

5.3 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 SQL Statements before using SQL Insights.
  • After Collect All SQL Statements is disabled, new SQL statements will not be collected anymore and the collected SQL data will be deleted.
  • Only the tasks created in the last two days can be displayed.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click Service List. Under Database, click Relational Database Service. The RDS console is displayed.
  4. On the Instances page, click the DB instance name.
  5. In the navigation pane, choose DBA Assistant > Historical Diagnosis.
  6. Click SQL Explorer and then SQL Insights.
  7. Click next to Collect All SQL Statements.

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

    Collecting all SQL statements generates a performance loss of no more than 5%.

  8. Click Create Task. In the displayed dialog box, specify Time Range, Dimension, and other configuration items, and click OK.
  9. In the task list, click Details in the Operation column to view task details.