Skip to main content

2. Slow Queries

Click on the details in the slow query trend chart on the management console page to go to the slow query management page.

2.1 Query Collection

Slow query collection supports two methods: one is scheduled collection based on crontab, which can customize the collection period by year, month, day, week, hour, minute, and second. The second is manual collection to obtain the current database slow log's slow queries.

  • Scheduled Collection

  • Manual Collection

2.2 Query Filtering

  • Text-based search

  • Status-based filtering

  • Database/schema-based filtering

  • SQL type-based filtering

2.3 Slow Query – Ignore

In some scenarios, such as in a test environment, the threshold for slow queries is set very low, resulting in some SQLs with no optimization space being captured. These SQLs can be simply ignored.

2.4 Slow Query – Optimization

Query Optimization refers to the performance optimization diagnosis of a set of SQL queries within your workspace, which generally includes SQL review, rewriting optimization, and index recommendations.

Users can configure the input, output, data source, and execution process of the optimization task. For details, please refer to PawSQL Optimization Platform's Create Optimization.

For the interpretation of the optimization results, please refer to PawSQL Optimization Platform's Create Optimization.