What problem does it solve? Slow database queries degrade application latency and waste infrastructure resources, but identifying which queries to fix requires evidence rather than guesswork. This Skill runs a structured weekly audit that ranks PostgreSQL queries by total database time and produces evidence-backed optimization recommendations. ## Core Features & Use Cases - Metric-Based Ranking: Queries Datadog scalar metrics (total time, call count, rows, errors) across current and prior weekly windows to rank query signatures by impact and growth. - Evidence Collection: Retrieves normalized SQL from DBM query samples and explain plans via Datadog logs analytics, with fallback to richer metric grouping or safe reproduction plans when DBM access is unavailable. - Actionable Recommendations: Classifies findings as actionable, needs-more-evidence, or no-action, and produces a report with proposed fixes, index specifications, validation plans, and rollback plans. - Use Case: A backend engineer notices rising p95 latency on openrouter-web. They run this audit to identify the top three query signatures consuming database time, confirm a missing index via an explain plan, and ship an idempotent CREATE INDEX CONCURRENTLY migration. ## Quick Start Ask the AI to run the weekly slow query audit for the primary database instance using the configured Datadog credentials and deliver the report as an attached markdown file.