Monitoring of commands
The Monitoring → Commands page in the ADB Control web interface displays the SQL commands that are performed in the ADB clusters connected to the monitoring system. This page includes two tabs Online and History, each of which is described in detail below.
List of commands
Online
The Monitoring → Commands → Online tab displays commands in the following statuses:
-
Queued
— the commands on which information about the actual start of execution has not yet received. -
Running
— the commands that are currently running. -
Cancelling
— the commands that are currently cancelling (as a part of the transaction cancellation or termination).
At the top of the tab, the Current count field is located. It displays a total count of online commands in ADB clusters connected to the monitoring system.


On the Monitoring → Commands → Online tab, there is a table with the following information on commands.
Field | Description |
---|---|
Command ID |
A unique command identifier, which includes:
|
Command text |
The first symbols of a command text. To view the full text (in case of long queries), hover the mouse over the field value |
SQL ID |
A common identifier for SQL commands with the same structure |
Username |
A name of the user who started the command |
Status |
A command status. Possible values are listed above |
Database |
A name of the database where the command is launched |
Resource Group |
A name of the resource group that is used for the command |
Cluster |
A name of the ADB cluster where the command is launched |
Planner |
A name of the query optimizer that is used to produce the query execution plan. Possible values:
|
Submitted |
The timestamp when the user submitted the command (in the |
If necessary, you can add columns to the table. To do this, click Customize table and select column names in the section that opens. Currently you can add system metrics that are described below.


Above the table with a list of commands, the Cluster filter is located. You can use this filter to select the ADB cluster and its databases for which you want to display data in the table. Initially all databases of the default cluster are selected.


In the column headers of the table with a list of commands,
there are filters that you can use to select specific data. To open a filter, click the
icon. For those columns where the set of possible values is limited (e.g. Status), you can select a value from the drop-down list.
For some columns (e.g. Username), the search value should be entered.
For columns that show date and time (e.g. Submitted), the time range can be selected from the calendar.
The
icon means that a filter is defined for the column. To reset all filters, click Reset.
History
The Monitoring → Commands → History tab displays commands in the following statuses:
-
Done
— successfully completed commands. -
Cancelled
— cancelled commands (as a part of the transaction cancellation or termination). -
Error
— the commands during which some errors occurred. -
Unknown
— the commands, the final status of which is undefined. It is set on a timeout for queries in theQueued
,Running
,Cancelling
statuses, for which there are no corresponding rows in thepg_stat_activity
view.


Most of the fields in the table with the list of commands on the History tab match the fields that are described above for the Online tab. Additionally, the following fields are available:
-
Ended — a command end timestamp in the
DD/MM/YYYY HH:mm:ss
format. The field is filled in both as a result of successful execution and in case of error or cancellation. -
Run Time — a total command duration in hours, minutes, seconds.
Like on the Online tab, you have the ability to add additional columns to the table by clicking Customize table.
Above the table with a list of commands, there are filters that you can use to select specific data. In addition to the Cluster filter described above, the History tab contains the following filters:
-
Relation — filter by the relations that are used in commands. Enter a full value.
-
Schema — filter by the database schema, to which the relations used in commands belong. Enter a full value.


Command details
To view the command details, click the command identifier (Command ID) in the table on the Monitoring → Commands → Online or Monitoring → Commands → History tab.


The following page contains multiple sections that are described below.
Header
At the top of the page, the following information is displayed:
-
The command unique identifier (see Command ID above). In the example below —
1695219736-11866-3—209077013
. -
The command status (see Status above). In the example below —
Running
. -
The command sequence number in ADB Control (starting with
1
). The continuous numbering is used across all clusters. In the example below —2683
. -
Transaction ID — the transaction identifier. To view transaction details, click the identifier.
-
Run time — the command duration in hours, minutes, seconds.


Overview
The Overview section displays the general command information. In addition to the fields mentioned above, the following information is available:
-
Run time — the command duration in hours, minutes, seconds.
-
Est. progress — the progress of the command execution, which is calculated as a percentage of the time predicted by the query planner. The following formula is used:
where:
-
Est.Cost(x)
— the estimate of the plan node cost made by the planner. -
NodeProgress(x)
— the progress for each node of the query plan, which is calculated by the following formula:
-