CtrlK
BlogDocsLog inGet started
Tessl Logo

g14wxz/db-diagnostics-inspection

Provides database health diagnostics via slow query analysis, bottleneck identification, and Postgres inspection.

100

Quality

100%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

Db Diagnostics Inspection

Provides database health diagnostics via slow query analysis, bottleneck identification, and Postgres inspection.

Overview

This tile enables agents to inspect Supabase Postgres health using system catalog views. It targets pg_stat_statements for query performance, pg_stat_user_tables for table-level I/O patterns, and pg_stat_user_indexes for index utilization. All queries run through the MCP execute_sql interface. The inspection is strictly read-only.

Reference

Catalog ViewPurpose
pg_stat_statementsQuery execution times, call counts, row counts
pg_stat_user_tablesSequential vs index scans, dead tuples, vacuum status
pg_stat_user_indexesIndex scan frequency, tuple reads/fetches
pg_stat_activityActive connections, idle sessions, query states
pg_locksLock contention and blocked queries

Key Thresholds

  • Slow query: mean_exec_time > 100ms
  • Missing index: seq_scan > 1000 AND idx_scan = 0
  • Vacuum backlog: n_dead_tup > 10000
  • Connection pressure: active connections > 80% of max_connections

Dependencies

  • supabase-mcp-verification (root prerequisite) — MUST pass before any diagnostic query executes.
  • pg_stat_statements extension — MUST be enabled on the target database.

Composition Position

  • Stage: database-observability
  • Priority: MEDIUM
  • Runs after MCP verification. Produces diagnostic reports consumed by remediation or alerting tiles downstream.
Workspace
g14wxz
Visibility
Public
Created
Last updated
Publish Source
CLI
Badge
g14wxz/db-diagnostics-inspection badge