> ## Documentation Index
> Fetch the complete documentation index at: https://ngquct-feat-721-compare-sync.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Server Dashboard

> Monitor active sessions, server metrics, and slow queries in real time

The dashboard shows active sessions, key server metrics, and slow-running queries with configurable auto-refresh.

Open it from the menu bar **View > Server Dashboard**. A Dashboard toolbar button is also available: right-click the toolbar, choose **Customize Toolbar**, and drag it in.

<Frame caption="Server Dashboard showing active sessions, metrics, and slow queries">
  <img className="block dark:hidden" src="https://mintcdn.com/ngquct-feat-721-compare-sync/Px1jOVnHwSdgRuFN/images/server-dashboard.png?fit=max&auto=format&n=Px1jOVnHwSdgRuFN&q=85&s=5472300d9567499e1107ee251ec5ef35" alt="Server Dashboard" width="3024" height="1704" data-path="images/server-dashboard.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/ngquct-feat-721-compare-sync/Px1jOVnHwSdgRuFN/images/server-dashboard-dark.png?fit=max&auto=format&n=Px1jOVnHwSdgRuFN&q=85&s=d37eaa652f43286026a177f33824e9f1" alt="Server Dashboard" width="3024" height="1704" data-path="images/server-dashboard-dark.png" />
</Frame>

The panels are stacked top to bottom. Drag the dividers between Active Sessions, Server Metrics, and Slow Queries to resize each section; positions are remembered across launches.

## Active Sessions

A sortable table of all connections to the server, showing:

* **PID**: process or session ID
* **User**: connected user
* **Database**: target database
* **State**: current status (active, idle, sleeping)
* **Duration**: how long the current operation has been running
* **Query**: the SQL statement being executed (truncated, hover for full text)

### Kill and Cancel

Each session row has action buttons:

* **Cancel Query** (stop icon): cancels the running query without terminating the connection (`pg_cancel_backend` on PostgreSQL, `KILL QUERY` on MySQL)
* **Terminate Session** (x icon): kills the entire connection

Both actions show a confirmation alert before executing. If the server rejects the action, an Action Failed alert shows the error.

## Server Metrics

A horizontal strip of metric cards. What is shown depends on the database:

| Database                            | Metrics shown                                                                                                        |
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| PostgreSQL / Redshift / CockroachDB | Connections, cache hit ratio, database size, uptime, active queries                                                  |
| MySQL / MariaDB                     | Connected threads, running threads, uptime, total queries, slow queries, max connections, bytes received, bytes sent |
| MSSQL                               | User sessions, uptime, database size                                                                                 |
| ClickHouse                          | Active queries, active merges, part mutations, disk usage                                                            |
| DuckDB                              | Database size, block size, total blocks, memory limit, threads                                                       |
| SQLite                              | Database size, page count, page size, journal mode, cache size                                                       |

## Slow Queries

A list of queries running longer than 1 second, sorted by duration. Each entry shows the elapsed time, SQL text, user, and database.

ClickHouse is different: the list comes from `system.query_log`, so it shows the 20 most recent finished queries that took over a second, newest first, with no database.

## Auto-refresh

* **Interval menu**: 1s, 2s, 5s (default), 10s, 30s, or Off
* **Pause/Resume**: stops refreshing without changing the interval (disabled when the interval is Off)
* **Refresh Now**: runs one refresh
* **Last refresh time**: shown on the right

## Database Support

| Database                            | Sessions | Metrics | Slow Queries | Kill | Cancel |
| ----------------------------------- | :------: | :-----: | :----------: | :--: | :----: |
| PostgreSQL / Redshift / CockroachDB |    Yes   |   Yes   |      Yes     |  Yes |   Yes  |
| MySQL / MariaDB                     |    Yes   |   Yes   |      Yes     |  Yes |   Yes  |
| MSSQL                               |    Yes   |   Yes   |      Yes     |  Yes |    -   |
| ClickHouse                          |    Yes   |   Yes   |      Yes     |  Yes |    -   |
| DuckDB                              |     -    |   Yes   |       -      |   -  |    -   |
| SQLite                              |     -    |   Yes   |       -      |   -  |    -   |

For databases without a dashboard provider (Redis, MongoDB, and others), the menu item and toolbar button are disabled.
