Active Queries
Monitor currently running queries and locks in real time.
The Active page shows every query currently executing on your database, updated in real time.
Live View
The page auto-refreshes every 5 seconds, showing each active session with:
| Field | Description |
|---|---|
| PID | Process ID of the backend (PostgreSQL) or query ID (ClickHouse) |
| Query | The SQL text being executed |
| State | Backend state: active, idle in transaction, waiting, etc. |
| Duration | How long the query has been running |
| Wait event | What the query is waiting on, if anything (PostgreSQL) |
| Blocking PIDs | Other processes blocking this query (PostgreSQL) |
ClickHouse-Specific Fields
| Field | Description |
|---|---|
| Memory usage | Current memory consumed by the query |
| Read bytes / rows | Data read from storage |
| Written bytes | Data written |
Locks
The locks view shows the current lock state of your database:
| Field | Description |
|---|---|
| Lock type | The type of lock (relation, transactionid, advisory, etc.) |
| Mode | Lock mode (AccessShareLock, RowExclusiveLock, etc.) |
| Relation | The table or object being locked |
| Granted | Whether the lock has been acquired or is waiting |
| Blocked by | PID of the session holding the conflicting lock |
| Duration | How long the lock has been held or waited on |
Wait Events
The waits view aggregates wait event data over time, showing what your database spends time waiting on:
| Field | Description |
|---|---|
| Wait event type | Category (IO, Lock, LWLock, Client, etc.) |
| Wait event | Specific event within the type |
| Count | Number of times observed |
| Total duration | Cumulative time spent waiting |
High Lock or LWLock waits indicate contention. High IO waits may indicate storage bottlenecks or an undersized buffer pool.
WebSocket API
For programmatic access, the active queries endpoint supports WebSocket streaming:
GET /api/v1/databases/{id}/active/ws?token=<jwt>&interval=5The WebSocket pushes snapshots of active queries and locks at the specified interval (in seconds). Authentication is via the token query parameter or a session cookie.