performance-query-review

Identify slow database queries and ORM bottlenecks in backend services.

Updated Apr 26, 2026
One-click install
npx skills add https://github.com/ringlochid/coding-skills --skill performance-query-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-query-review
Source: https://github.com/ringlochid/coding-skills/tree/main/performance-query-review
Command: npx skills add https://github.com/ringlochid/coding-skills --skill performance-query-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identifies slow database queries and ORM bottlenecks in backend services, enabling targeted optimizations and verified improvements.

Core Features & Use Cases

  • Detect bottlenecks in DB queries and ORM loading.
  • Assess N+1 issues, query shapes, index usage, and pagination.
  • Provide actionable recommendations and minimal verification steps.
  • Use case: Analyze an API endpoint that fetches related data causing latency to reduce the overall response time.

Quick Start

Provide the endpoint or query path and observed latency to start the review.

Frequently Asked Questions about performance-query-review

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

FAQPage Schema
How do I diagnose slow ORM queries and N+1 issues in backend services?

To diagnose slow ORM queries, analyze endpoint query paths to detect N+1 patterns, assess query shapes, and evaluate index usage. Provide the endpoint or query path along with observed latency to produce evidence-backed bottlenecks and minimal measurable fixes.

How do I fix database query bottlenecks causing API endpoint latency?

Fix database query bottlenecks by identifying slow query paths and ORM loading issues. Apply targeted optimizations like pagination adjustments and index improvements, then verify results with minimal measurable steps to reduce overall endpoint response time.

When do I need to run EXPLAIN ANALYZE for database performance review?

Run EXPLAIN ANALYZE when the database performance review indicates complex query shapes or missing indexes warrant deeper inspection. The review process clearly indicates when EXPLAIN or EXPLAIN ANALYZE is warranted to validate query execution plans and bottlenecks.

What is the best way to identify N+1 query patterns in backend jobs?

The best way to identify N+1 patterns is to review ORM query execution in task or job surfaces that fetch related data. Analyzing query paths exposes repeated loading, enabling targeted optimizations and verified latency improvements.

Can I assess pagination and index usage for slow database queries?

Yes, you can assess pagination and index usage by reviewing the query shape and ORM loading behavior. The performance review produces evidence-backed bottlenecks and actionable recommendations to apply minimal fixes for slow database queries.