All Products
Search
Document Center

Database Autonomy Service:Transaction analysis

Last Updated:Dec 04, 2025

You can use the transaction analysis feature to retrieve the transaction type, number of transactions, and transaction details for a thread within a specified time period. This helps you understand, analyze, and optimize database performance at the transaction level.

Overview

The transaction analysis feature uses data from the hot storage of DAS Enterprise Edition V3 or Compliance Edition to analyze the transaction details for a selected thread and time range. It then performs a statistical analysis and plots a trend chart that shows the number of different transaction types.

image

Note

Some transactions can be of multiple special types at the same time. For example, a transaction can be both an implicitly submitted transaction and a long-running transaction.

The following types of transactions can be analyzed:

  • Normal transaction.

  • Implicitly submitted transaction.

  • Large transaction: a transaction that updates more than 10,000 rows.

  • Long-running transaction: a transaction that lasts for more than 10 minutes.

  • Transaction with a long pause: a transaction that is paused for more than 1 minute.

  • Transaction with too many statements: a transaction that contains more than 100 SQL statements. Only SQL statements that involve updates are counted, such as INSERT, UPDATE, DELETE, MERGE, CREATE, ALTER, DROP, SET, REPLACE, and RENAME.

  • Boundary transaction: a transaction whose end statement is not included in the analysis time range.

Prerequisites

  • The target database engine is:

    • ApsaraDB RDS for MySQL

    • PolarDB for MySQL

  • The database instance is connected to DAS and its status is Accessed.

  • The database version and region support DAS Enterprise Edition V3 or Compliance Edition. For more information, see Editions and supported features.

  • DAS Enterprise Edition V3 or Compliance Edition is enabled for the instance. For more information, see DAS Enterprise Edition.

Scenarios

  • Analyze transactions that cause deadlocks to resolve the deadlocks and improve database performance. You can use the Deadlock Analysis information from the lock analysis feature.

  • Analyze the source of transaction blocking to resolve and optimize lock wait issues. You can use the transaction blocking analysis information from the lock analysis feature.

  • Analyze the transaction information for the thread of a specific SQL statement using audit logs.

Limits

  • This feature analyzes only SQL data within the time range of the hot storage of DAS Enterprise Edition V3 or Compliance Audit Edition.

    Note
    • You can modify the hot storage duration for DAS Enterprise Edition V3 or Compliance Audit Edition on the SQL Explorer and Audit page. To do this, click Service Settings in the upper-right corner.

    • Hot storage incurs fees. For more information about billing, see Billing details.

  • An instance can have only one running transaction analysis task.

  • A single transaction analysis task supports a maximum of two threads.

  • A single transaction analysis task supports data analysis for a maximum of 30 minutes.

Procedure

  1. Log on to the DAS console.

  2. In the navigation pane on the left, click Intelligent O&M Center > Instance Monitoring.

  3. Find the target instance, click the instance ID, and then go to the instance details page.

  4. In the navigation pane on the left, click Request Analysis > SQL Explorer and Audit. On the page that appears, click the SQL Explorer tab and then click the Transaction Analysis tab.

    • Create a transaction analysis task

      Click Create Analysis Task. Select a time range, enter a thread ID, and then create the transaction analysis task. The created diagnostic task appears in the Transaction Analysis List.

      image

      Note

      Enter a valid thread ID. You can obtain thread IDs from pages such as Lock Analysis Overview, the Audit log list, and Instance Sessions.

    • View transaction analysis results

      You can set a time period to view the transaction analysis task records for that period.

      • In the Transaction Analysis List, find the target diagnostic task and click View Details in the Actions column to view the trend chart of transaction counts by type and the transaction list.

      • In the Transaction Overview section, click a bar in the column chart to view the list of transactions that started within that minute. Click View Details in the transaction details column to view the SQL details within the transaction.

      Important

      You can query details only for SQL data within the hot storage time range.