database-query-optimizer

Community

Optimize database queries, eliminate N+1 issues.

AuthorMaciWP
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill identifies and resolves common database performance bottlenecks, such as slow queries, N+1 problems, and missing indexes, ensuring your applications run faster and more efficiently.

Core Features & Use Cases

  • N+1 Query Detection & Fixes: Automatically find and eliminate inefficient N+1 query patterns using eager loading (JOINs) in ORMs like SQLAlchemy or Prisma.
  • Index Suggestions: Analyze query plans and recommend optimal database indexes to speed up WHERE, ORDER BY, and JOIN clauses.
  • Use Case: Analyze a slow API endpoint that fetches users and their associated posts, then optimize the query to fetch all data in a single database hit, or interpret EXPLAIN ANALYZE output to pinpoint performance issues.

Quick Start

Analyze the following SQLAlchemy query for N+1 problems and suggest eager loading: users = db.query(User).all(); for user in users: print(user.posts).

Dependency Matrix

Required Modules

PostgreSQLMySQLMongoDBRedisSQLAlchemyPrismaTypeORMMongooseDrizzle

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: database-query-optimizer
Download link: https://github.com/MaciWP/CV_Astro/archive/main.zip#database-query-optimizer

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.