basiradocs
Dashboard

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:

FieldDescription
PIDProcess ID of the backend (PostgreSQL) or query ID (ClickHouse)
QueryThe SQL text being executed
StateBackend state: active, idle in transaction, waiting, etc.
DurationHow long the query has been running
Wait eventWhat the query is waiting on, if anything (PostgreSQL)
Blocking PIDsOther processes blocking this query (PostgreSQL)

ClickHouse-Specific Fields

FieldDescription
Memory usageCurrent memory consumed by the query
Read bytes / rowsData read from storage
Written bytesData written

Locks

The locks view shows the current lock state of your database:

FieldDescription
Lock typeThe type of lock (relation, transactionid, advisory, etc.)
ModeLock mode (AccessShareLock, RowExclusiveLock, etc.)
RelationThe table or object being locked
GrantedWhether the lock has been acquired or is waiting
Blocked byPID of the session holding the conflicting lock
DurationHow 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:

FieldDescription
Wait event typeCategory (IO, Lock, LWLock, Client, etc.)
Wait eventSpecific event within the type
CountNumber of times observed
Total durationCumulative 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=5

The 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.

On this page