advanced-database-tuning

Analyze and tune PostgreSQL and MySQL databases for reduced latency and improved throughput.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/ivanuser/cortex-server-skills --skill advanced-database-tuning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: advanced-database-tuning
Source: https://github.com/ivanuser/cortex-server-skills/tree/main/server/advanced-database-tuning
Command: npx skills add https://github.com/ivanuser/cortex-server-skills --skill advanced-database-tuning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database deployments often suffer from latent queries, bloated maintenance tasks, and suboptimal pool configurations that degrade performance. Advanced Database Tuning provides structured guidance to analyze, tune, and validate changes to restore responsiveness and stability.

Core Features & Use Cases

  • Slow Query Analysis: identify and optimize expensive queries to reduce latency.
  • Vacuum & Analyze Strategy: optimize autovacuum and ANALYZE to maintain up-to-date statistics.
  • Connection Pooling: configure and tune PgBouncer/ProxySQL for scalable concurrency.
  • Index Tuning Workflow: guide for safe index creation and impact assessment.
  • Baseline Validation: establish benchmarks before and after tuning to confirm gains.

Quick Start

Apply baseline tuning steps to your production database during a maintenance window to observe performance improvements.

Frequently Asked Questions about advanced-database-tuning

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

FAQPage Schema
How do I fix slow PostgreSQL queries in production?

Analyze slow PostgreSQL queries to identify expensive operations and apply safe tuning steps to reduce latency. Establish baseline benchmarks before and after changes to confirm performance gains without risking production stability.

What is the best way to configure PgBouncer for connection pooling?

Configure PgBouncer connection pooling by validating pool settings under varying workloads to ensure scalable concurrency. The tuning workflow benchmarks throughput before and after adjustments, providing rollback guidance if performance degrades.

How do I optimize autovacuum and ANALYZE strategies in MySQL and PostgreSQL?

Optimize autovacuum and ANALYZE strategies by adjusting maintenance tasks to maintain up-to-date statistics and prevent bloat. The tuning process validates these settings against production workloads to restore database responsiveness safely.

Can I apply database tuning changes directly to a live production deployment?

Apply database tuning to production deployments during a maintenance window using safe, production-ready steps. The workflow enforces safeguards on risky changes, validates pool settings, and provides rollback guidance to maintain stability.

How do I safely create indexes without impacting database performance?

Safely create indexes by following an index tuning workflow that assesses impact before application. Establish baseline benchmarks to measure query latency reduction and ensure the change improves throughput without destabilizing the system.