query-performance-analysis

Detect and fix N+1 queries, slow queries, and missing indexes in MongoDB-backed PHP endpoints.

5|Updated May 30, 2023
One-click install
npx skills add https://github.com/VilnaCRM-Org/core-service --skill query-performance-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: query-performance-analysis
Source: https://github.com/VilnaCRM-Org/core-service/tree/main/.claude/skills/query-performance-analysis
Command: npx skills add https://github.com/VilnaCRM-Org/core-service --skill query-performance-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detects N+1 queries, slow queries, and missing indexes in MongoDB-backed endpoints to prevent performance regressions.

Core Features & Use Cases

  • N+1 query detection and resolution using profiling and efficient loading strategies.
  • Slow query identification with EXPLAIN analysis and index recommendations.
  • Safe online index migrations with verification steps to minimize production impact.

Quick Start

Enable MongoDB profiling, run the targeted endpoint, and review EXPLAIN results to validate index usage and performance improvements.

Frequently Asked Questions about query-performance-analysis

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

FAQPage Schema
How do I detect and fix N+1 queries in MongoDB-backed PHP endpoints?

Identify slow MongoDB queries by running the database profiler against targeted endpoints and interpreting the EXPLAIN plan output to validate index usage and isolate performance bottlenecks.

Can I apply online index migrations to MongoDB without production downtime?

Index MongoDB collections safely by analyzing EXPLAIN results from the profiler to identify missing indexes, then applying targeted index recommendations to optimize query execution paths.

What is the best way to profile MongoDB query performance in PHP projects?

Profile MongoDB query performance in PHP projects by enabling the MongoDB profiler, running the targeted API endpoint, and reviewing the resulting EXPLAIN output to measure and validate improvements.

Why does my MongoDB query performance regress when API endpoints scale?

MongoDB query performance regresses during scaling due to N+1 query patterns, slow queries, and missing indexes, which you detect and resolve using profiling and EXPLAIN analysis.