MatrixUI Query Monitoring

Active Sessions

Active Session List

After logging in to MXUI, click Query Monitoring in the left navigation panel to access the Active Sessions page.

  1. The session list data is sourced from pg_stat_activity. By default, the list is sorted in descending order by query_start time and automatically refreshes every 10 seconds. To examine a specific entry in detail, you can pause the refresh to prevent the target session from being filtered out during inspection. To reduce system load caused by frequent auto-refreshing, the refresh function will automatically stop when you exit the Query Monitoring page.
  2. The list displays queries with active + idle in transaction status by default. You can click any status on the state status bar to filter the list. Each status block shows the count of state + Number of sessions in that state.

Explanation of idle in transaction This status indicates that the query has completed execution, but the corresponding transaction has not yet been committed or rolled back. Although queries in this state do not consume CPU or I/O resources, they occupy connection and concurrency limits. Additionally, all locks held by queries within the transaction remain active until the transaction is committed or rolled back. During this period, most queries involving tables affected by the transaction will be blocked, which may degrade system response performance.
If a transaction remains in idle in transaction status for an extended period (e.g., over one hour), it is recommended to commit or roll back the transaction promptly.

Active Session Details

Click the View button on the right side of the target session to open the query details page. This page displays all field information of the query from the pg_stat_activity table and supports terminating the session.

Blocked Sessions

Blocked Session List

Click Blocked Sessions to switch to the blocked session list, which shows current session blocking relationships in the database. The list is sorted in descending order by blocking duration—the longer the blocking relationship has existed, the higher it appears in the list. The content refreshes automatically every 10 seconds. To inspect a specific blocking relationship in detail, you can pause the refresh to avoid losing the current view due to auto-refresh. To minimize system load, auto-refresh stops when you leave the Query Monitoring page.

Blocked Session Details

Click the View button on the right side of the target blocking relationship to open the details page, which supports terminating the session.