Query Performance & Safety Guard

•
777
•

Prevents N+1 queries, inefficient batch processing, and memory-intensive recursion in database and service calls.

This skill provides specialized guidance for maintaining high-performance database interactions by detecting and fixing common architectural bottlenecks. It specifically targets the N+1 query problem in loops, prevents SQL failures from oversized IN clauses, enforces safety limits on recursive data traversals like organizational trees, and ensures proper indexing. It serves as an automated code reviewer for backend efficiency, helping developers transition from single-record thinking to batch-optimized implementation patterns to prevent production outages and API latency.

主要功能

01Detection and remediation of N+1 query patterns in loops and streams
02Safety constraints for BFS and recursive traversals to prevent OOM errors
03777 GitHub stars
04Index verification for large-table queries and aggregate functions
05Standardized batching for SQL IN clauses to prevent driver overflows
06Identification of redundant service-to-service calls within single requests

使用场景

01Securing recursive tree traversals (e.g., invitation or folder structures) against node explosion
02Refactoring legacy data transformation logic into efficient batch-aware DTO mappers
03Optimizing list-based API endpoints that suffer from linear SQL growth