db-performance-watchlist

Monitors PostgreSQL performance with slow query detection, connection pool tracking, and automated alerting.

2|Updated Jun 5, 2026
One-click install
npx skills add https://github.com/sathishssj3/NexVR-Engine --skill db-performance-watchlist-sathishssj3
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: db-performance-watchlist
Source: https://github.com/sathishssj3/NexVR-Engine/tree/main/.agents/skills/db-performance-watchlist
Command: npx skills add https://github.com/sathishssj3/NexVR-Engine --skill db-performance-watchlist-sathishssj3

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires node-cron, @prisma/client.

What problem does it solve? Database performance regressions often go unnoticed until they cause outages or degraded user experience. This Skill provides a structured monitoring strategy for PostgreSQL databases, detecting slow queries, connection pool saturation, low cache hit rates, and unused indexes before they become production incidents. ## Core Features & Use Cases - Slow Query Detection: Queries pg_stat_statements to surface queries exceeding configurable latency thresholds with call counts and execution time breakdowns. - Resource & Connection Monitoring: Tracks connection pool utilization, CPU, memory, disk usage, and cache hit rates with warning and critical alert thresholds. - Index Usage Analysis: Identifies unused indexes and tables with high sequential scans that may need indexing. - Automated Scheduling: Uses node-cron to run threshold checks every 5 minutes, hourly reports, and weekly index analysis, plus Grafana dashboard queries. - Use Case: A backend team notices rising API latency. They apply this Skill to generate a performance report, discover three queries averaging over 500ms, find a missing index on a high-traffic table, and set up automated alerts to catch future regressions. ## Quick Start Ask the AI to analyze your PostgreSQL database for slow queries and connection pool issues using the db performance watchlist monitoring strategy.

Frequently Asked Questions about db-performance-watchlist

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect slow queries in PostgreSQL?▼

Enable slow query logging with log_min_duration_statement, then query pg_stat_statements for queries whose mean execution time exceeds your threshold. The Skill's detection script returns the top 20 slowest queries with call counts, average and max durations, and percentage of total execution time.

How to monitor PostgreSQL connection pool usage with Prisma?▼

Query pg_stat_activity and pg_settings via Prisma raw SQL to count active, idle, and total connections against max_connections. The Skill calculates utilization percentage and triggers an alert when usage exceeds 80 percent.

What alert thresholds should I set for database monitoring?▼

The Skill defines warning and critical tiers: connection utilization at 70/85 percent, CPU at 70/85 percent, memory at 80/90 percent, disk at 75/85 percent, and cache hit rate at 90/80 percent. Adjust these based on your own SLAs and observed baselines.

Does this monitoring approach work with databases other than PostgreSQL?▼

The queries rely on PostgreSQL-specific system views like pg_stat_statements, pg_stat_activity, and pg_statio_user_tables, so they do not run on MySQL or other engines. You would need equivalent statistics views and rewritten queries for other databases.

Why is my PostgreSQL cache hit rate low?▼

A cache hit rate below 90 percent usually means working data exceeds shared_buffers memory or queries scan large cold tables. The Skill computes the rate from pg_statio_user_tables heap blocks hit versus read and alerts when it drops below the critical threshold.

How do I find unused indexes in PostgreSQL?▼

Query pg_stat_user_indexes for entries where idx_scan equals zero, excluding primary keys. The Skill lists these unused indexes ordered by size so you can drop them to reduce write overhead and storage consumption.