All Products
Search
Document Center

AnalyticDB:Overview

Last Updated:Mar 19, 2024

AnalyticDB for MySQL provides the SQL diagnostics feature to display SQL queries that meet a variety of search conditions (such as slow queries) as a chart. You can also download and save the search results to your computer. This topic describes how to go to the SQL Diagnostics tab and describes the supported search methods.

Precautions

The SQL diagnostics feature is not supported for clusters that are created in the Germany (Frankfurt), UK (London), US (Silicon Valley), and US (Virginia) regions.

Go to the SQL Diagnostics tab

  1. Log on to the AnalyticDB for MySQL console.
  2. In the upper-left corner of the page, select a region.
  3. In the left-side navigation pane, click Clusters.
  4. On the Data Warehouse Edition (V3.0) tab, find the cluster that you want to manage and click the Cluster ID.
  5. In the left-side navigation pane, click Diagnostic optimization to go to the SQL diagnostic optimization tab.
    The following information is displayed on the SQL diagnostic optimization tab:
    • The search results of SQL queries that are displayed in a chart. For more information, see Query monitoring charts.
    • The search results of SQL queries that are displayed in a list. For more information, see SQL queries.

Search methods

AnalyticDB for MySQL allows you to search for details of SQL queries by using the following methods:
  • General search
    • Search conditions: You can search for SQL queries based on a specific time range such as Last 5 Minutes, a state such as Completed Queries, or a duration such as Long-running Queries (Longer Than 1 Minute).
    • Result display: The general search results are displayed in the Query Monitoring Information section and on the SQL Queries tab. For more information about Query Monitoring Information and SQL Queries, see Use query monitoring charts and SQL queries.
    Note
    • By default, SQL queries that meet the Last 5 Minutes and Top 100 Most Time-consuming Queries conditions are displayed. Queries in progress are not included.
    • AnalyticDB for MySQL supports custom search of SQL queries within the last two weeks. The end time of the custom search must be later than the start time, and the interval between the start and end time cannot exceed 24 hours.
  • Advanced search
    • Search conditions: You can filter general search results based on a variety of conditions such as Peak Memory, Amount of Scanned Data, User, Database, and Resource Group. Valid values of User, Database, and Resource Group are existing values in the general search results instead of all values in the current AnalyticDB for MySQL cluster.

      For example, assume that an AnalyticDB for MySQL cluster contains three databases: db1, db2, and db3. Only db1 and db2 are involved in the general search results. In this case, valid values of Database in the upper-right corner of the advanced search section are db1 and db2.

    • Result display: Advanced search results are displayed only on the SQL Queries tab. Results in the Query Monitoring Information section are not affected.