db-query-patterns

Community

Detect and audit query anti-patterns for performance optimization.

AuthorHainrixz
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill identifies common query anti-patterns that can lead to performance issues in database operations, helping users optimize their queries and improve database performance.

Core Features & Use Cases

  • Detect SELECT *: Identifies queries that fetch all columns, defeating index usage and causing unnecessary load.
  • Identify Structural N+1: Finds queries within loops that could be optimized with joins or batched IN operations.
  • Analyze Pagination Methods: Audits the use of OFFSET pagination and suggests keyset/seek pagination for better performance.
  • Evaluate Non-SARGable Predicates: Detects conditions that prevent index usage and recommends solutions.
  • Use Case: A developer uses this Skill to review a SQL script and identify performance bottlenecks caused by inefficient query patterns.

Quick Start

Run the db-query-patterns skill on your SQL script to detect query anti-patterns.

Dependency Matrix

Required Modules

None required

Components

scripts

💻 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: db-query-patterns
Download link: https://github.com/Hainrixz/claude-db/archive/main.zip#db-query-patterns

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 620,000+ vetted skills library on demand.