preen-database-performance

Detect N+1 queries, inefficient joins, and missing indexes in databases.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/a2f0/tearleads --skill preen-database-performance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: preen-database-performance
Source: https://github.com/a2f0/tearleads/tree/main/.codex/skills/preen-database-performance
Command: npx skills add https://github.com/a2f0/tearleads --skill preen-database-performance

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill proactively identifies and resolves database performance bottlenecks, such as N+1 query patterns, inefficient joins, and missing indexes, to reduce latency and query volume.

Core Features & Use Cases

  • N+1 Query Detection: Finds queries executed within loops that lead to excessive database calls.
  • Join Optimization: Identifies inefficient join operations that can be optimized.
  • Index Gap Analysis: Detects missing indexes that slow down query execution.
  • Real-DB Regression Testing: Ensures performance improvements are validated against a live database with realistic data.
  • Use Case: Improve the loading speed of a user's playlist by optimizing the queries that fetch playlist details and associated tracks.

Quick Start

Run the preen-database-performance skill to find and fix N+1 query patterns in the playlist loading path.

Frequently Asked Questions about preen-database-performance

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

FAQPage Schema
How do I find and fix N+1 queries to reduce database latency?

To resolve N+1 query patterns and reduce database latency, this Skill proactively identifies queries executed within loops that cause excessive database calls, then optimizes the query paths to fetch associated data efficiently.

What is the best way to detect missing indexes and optimize SQL joins?

The best way to detect missing indexes and optimize SQL joins is through index gap analysis and join optimization, which this Skill performs by identifying inefficient join operations and adding necessary indexes to speed up query execution.

How does real-database regression testing validate query optimization fixes?

Real-database regression testing validates query optimization fixes by running tests against a live database populated with realistic data cardinality, ensuring that improvements to N+1 queries and joins actually reduce latency and query volume.

Can I optimize database performance for high-volume query paths without disrupting data retrieval?

Yes, you can optimize database performance for high-volume query paths safely. This Skill focuses on proactively resolving inefficient joins and missing indexes to reduce latency and volume while validating fixes against a realistic live database.

Why does my playlist loading path suffer from slow database query execution?

Your playlist loading path suffers from slow database query execution due to performance bottlenecks like N+1 query patterns, inefficient joins, and missing indexes that increase latency and query volume when fetching playlist details and associated tracks.