All Products
Search
Document Center

Database Autonomy Service:Transaction analysis

Last Updated:Mar 28, 2026

Transaction analysis lets you retrieve the type, count, and details of transactions for a specific thread within a selected time range. Use it to identify the root cause of deadlocks, lock waits, and other transaction-related performance problems.

How it works

Transaction analysis reads from the hot storage of DAS Enterprise Edition V3 or Compliance Audit Edition. For a selected thread and time range, it runs a statistical analysis and plots a trend chart showing the count of each transaction type.

image

DAS classifies each transaction into one or more of the following types:

TypeDefinition
Normal transactionA standard transaction
Implicitly submitted transactionA transaction submitted implicitly (autocommit)
Large transactionUpdates more than 10,000 rows
Long-running transactionLasts more than 10 minutes
Transaction with a long pausePaused for more than 1 minute
Transaction with too many statementsContains more than 100 SQL statements that involve updates (INSERT, UPDATE, DELETE, MERGE, CREATE, ALTER, DROP, SET, REPLACE, or RENAME)
Boundary transactionA transaction whose end statement falls outside the analysis time range
A transaction can match multiple types simultaneously. For example, a transaction can be both an implicitly submitted transaction and a long-running transaction.

When to use transaction analysis

Use transaction analysis when you encounter any of the following problems:

  • Deadlock: Examine the transactions involved in a deadlock event. Combine results with Deadlock Analysis from the lock analysis feature for a full picture.

  • Lock wait degradation: Trace which transactions are blocking others when lock waits are hurting database performance. Combine results with transaction blocking analysis from the lock analysis feature.

  • SQL thread investigation: When a specific SQL statement is causing issues, examine all transactions on that SQL's thread. Get the thread ID from audit logs.

Prerequisites

Before you begin, make sure that:

  • The database engine is ApsaraDB RDS for MySQL or PolarDB for MySQL

  • The database instance is connected to DAS with a status of Accessed

  • The database version and region support DAS Enterprise Edition V3 or Compliance Audit Edition — see Editions and supported features

  • DAS Enterprise Edition V3 or Compliance Audit Edition is enabled for the instance — see DAS Enterprise Edition

Limitations

LimitationDetailsWorkaround
Data rangeAnalyzes only SQL data within the hot storage time range. Hot storage incurs additional fees; see Billing details.To extend the coverage window, adjust the hot storage duration on the SQL Explorer and Audit page — click Service Settings in the upper-right corner.
Concurrent tasksOnly one transaction analysis task can run per instance at a time.Wait for the current task to complete before creating a new one.
Threads per taskEach task supports up to two threads.To analyze more threads, run separate tasks sequentially.
Time range per taskEach task covers a maximum of 30 minutes.For longer time ranges, run multiple tasks covering consecutive 30-minute windows.

Run a transaction analysis

Create a task

  1. Log on to the DAS console.

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

  3. Find the target instance and click its ID to open the instance details page.

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

  5. Click Create Analysis Task. Select a time range (up to 30 minutes), enter a thread ID, and confirm to create the task. The task appears in the Transaction Analysis List.

    Enter a valid thread ID. Get thread IDs from Lock Analysis Overview, the audit log list, or Instance Sessions.

Interpret the results

  1. In the Transaction Analysis List, find the completed task and click View Details in the Actions column. The details page shows:

    • A trend chart of transaction counts by type over the selected time range.

    • A transaction list below the chart.

  2. In the Transaction Overview section, click a bar in the column chart to filter the transaction list to transactions that started within that minute.

  3. Click View Details in the transaction details column to inspect the SQL statements within a specific transaction.

    Important

    SQL details are available only for data within the hot storage time range.

What's next

  • Lock analysis — investigate deadlocks and transaction blocking in detail

  • Audit logs — search SQL statements and retrieve thread IDs

  • Instance Sessions — view active sessions and retrieve thread IDs