Repository navigation
Description
Problem
Database > Server Dashboard lists sessions, metrics and slow queries, with Cancel Query and Terminate Session, on PostgreSQL, Redshift, CockroachDB, MySQL, MariaDB, SQL Server and ClickHouse (features/server-dashboard.mdx:51-61), and shows metrics on Typesense (databases/typesense.mdx:101). On any other engine the menu item is dimmed. The engines with a dashboard are a closed list in apple/TablePro/Core/ServerDashboard/ServerDashboardQueryProviderFactory.swift:50-57.
Oracle, MongoDB and Redis are missing. Finding the session that holds a lock or the client hammering a server means writing the catalog query or admin command by hand, then another one to stop it.
Proposed solution
One provider per engine, behind the same dashboard:
- Oracle: sessions from
V$SESSIONjoined toV$SQLfor the statement text, withLAST_CALL_ETas the duration. Metrics fromV$SYSMETRICandV$INSTANCE(sessions, CPU, logical reads per second, uptime). Cancel withALTER SYSTEM CANCEL SQL 'sid, serial#'on 18c and later; terminate withALTER SYSTEM KILL SESSION 'sid, serial#' IMMEDIATE. - MongoDB: operations from the
$currentOpaggregation stage, metrics fromserverStatus(current and available connections, operation counters, uptime, resident memory), and cancel withkillOp. The profiler'ssystem.profilefeeds slow queries where profiling is on. - Redis: clients from
CLIENT LIST(address, name, database, age, idle time, last command), metrics fromINFO(connected clients, used memory, operations per second, keyspace hit ratio, uptime), slow queries fromSLOWLOG GET, and terminate withCLIENT KILL ID. On a cluster, one row per node. - The rule the dashboard already follows holds here: what the account cannot see stays blank, and the dashboard says which privilege or ACL command is missing (
features/server-dashboard.mdx:6).
Done when: each engine's sessions, metrics and slow queries fill in against a local server, and each Cancel or Terminate offered works and confirms first.
Alternatives considered
Query V$SESSION, run db.currentOp() or CLIENT LIST in a query tab, then run the kill command by hand.
Platform
macOS
Related database type
N/A / General
Activity