Database Autonomy Service (DAS) provides the request analysis feature that allows you to view global slow query logs and the analysis results of all SQL requests.

Prerequisites

  • The slow log feature is available only for the following types of database instances:
    • ApsaraDB RDS for MySQL
    • Self-managed MySQL database
    • ApsaraDB for Redis instance
    • Self-managed Redis database
    • Self-managed MongoDB database
  • To view the analysis results of all requests, the database instances must meet the following conditions:
    • The full request feature is enabled for a database instance in the China (Shanghai) region.
    • DAS Professional Edition is enabled for the database instance. For more information, see Purchase DAS Professional Edition.

Slow query logs

  1. Log on to the DAS console.
  2. In the left-side navigation pane, choose Request Analysis > Slow Logs.
  3. On the Slow Logs page, select an engine and view the global slow query logs of the databases that run the selected engine.
    • Select a time range to view the Global Slow Log Trend chart and the Top Instance Statistics table within the specified time range. You can use one of the following methods to select the time range:
      • Click Last 24 Hours, Last 3 Days, or Last 7 Days to view the slow query log trend for a specified type of database instances within the last 24 hours, last three days, or last seven days.
      • Specify the start time and end time of the range within which you want to view slow query logs. Then, click Search.
        Note When you select a time range, the end time must be later than the start time. You can view the slow query log trends within up to two weeks.
      Global trends of slow query logs
    • In the Global Slow Log Trend chart, click a time point of the slow query logs. You can view the information of related database instances at that time point in the Top Instance Statistics section. Top Instance Statistics

Full request

  1. Log on to the DAS console.
  2. In the left-side navigation pane, choose Request Analysis > Full Request.
    1
    Note
    • You can specify a time range to view the Full Request Trend chart and the Full Request Statistics table.
    • You can click Export to export the data in the Full Request Statistics table. You can export up to 10 million rows of data at a time.

References