SkillsLib.ai

SQL Query Optimization for Database Administrators

Optimize SQL queries and eliminate database bottlenecks

0.0(0 reviews)
100+ downloads
Updated Nov 2026

What You Can Do

Analyze your SQL queries to identify performance bottlenecks and generate optimized versions. You get refactored queries with better execution plans, index recommendations, and explanations of the improvements. Transform slow, resource-heavy queries into fast, efficient database operations.

Features

Query analysis

Breaks down execution plans and identifies slow operations causing performance degradation

Optimization recommendations

Suggests JOIN rewrites, subquery improvements, and structural changes

Index creation guidance

Proposes specific indexes with column selections and performance impact estimates

EXPLAIN plan interpretation

Translates database output into actionable insights and bottleneck identification

Multi-database support

Handles PostgreSQL, MySQL, SQL Server, and SQLite syntax and query engines

Cost estimation

Compares before/after performance metrics and quantifies improvement potential

Optimization patterns

Applies proven techniques like query decomposition, window functions, and materialization

Tuning strategies

Recommends partitioning, caching, and statistical analysis for persistent performance

Example Output

Example: Optimized JOIN query

Original (2500ms):

code
SELECT u.id, COUNT(o.id) FROM users u
LEFT JOIN orders o ON u.id = o.user_id
WHERE u.created_at > '2026-01-01'
GROUP BY u.id ORDER BY COUNT(o.id) DESC;

Optimized (280ms):

code
SELECT u.id, o.order_count FROM users u
LEFT JOIN (SELECT user_id, COUNT(*) as order_count
  FROM orders WHERE created_at > '2026-01-01'
  GROUP BY user_id) o ON u.id = o.user_id
ORDER BY o.order_count DESC;

✓ 89% faster — Aggregate pushed down; index on orders.created_at eliminates full table scan

What's Included

  • SKILL.md: Query optimization workflows and decision trees
  • SQL analysis template: Structured checklist for query evaluation
  • Index recommendation worksheet: Identifies candidate columns and selectivity metrics
  • EXPLAIN plan decoder: Interprets cost estimates and node types across database systems
  • Before/after metrics tracker: Documents baseline vs. optimized performance
  • Multi-database reference: Syntax and optimization patterns for PostgreSQL, MySQL, SQL Server, SQLite

Who It's For

  • Database administrators — Optimize legacy systems and production workloads
  • Backend engineers — Improve API response times and reduce database load
  • DevOps engineers — Tune high-traffic databases and identify scaling needs
  • Data engineers — Speed up ETL pipelines and analytical queries
  • System architects — Plan indexing strategies during schema design

Best For

  • Analyzing EXPLAIN plans from slow query logs
  • Creating index strategies for high-traffic tables
  • Refactoring complex JOINs and subqueries
  • Optimizing batch operations and bulk data processing
  • Diagnosing database performance bottlenecks in production

You might also like

Antenna Design & Optimization Skill
$30
Antenna Design & Optimization Skill

You can accelerate your entire antenna design workflow—from initial concept to optimized specifications—by leveraging Claude's knowledge of electromagnetic theory, antenna types, and design trade-offs. Claude helps you parameterize designs, identify optimal configurations for your frequency band and application, and prepare detailed briefs for simulation and manufacturing. You'll generate design reviews, impedance-matching solutions, and validation checklists without context-switching to multiple tools.

Incident Response & Root Cause Analysis
$35
Incident Response & Root Cause Analysis

Rapidly analyze production incidents by correlating observability signals—logs, metrics, traces, and events—to identify the true root cause instead of symptoms. You'll reconstruct incident timelines, quantify impact scope, and generate both immediate remediation steps and long-term prevention measures.

Git Commit Message Writer
$45
CI/CD4.3(47)
Git Commit Message Writer

Claude analyzes your code diffs and generates standardized commit messages that follow the Conventional Commits specification. The skill automatically determines the correct commit type, scope, and description based on the changes you've made, ensuring your messages are parseable by automation tools while remaining human-readable for code reviewers.

Full-Stack Feature Development Workflow
$30
Full-Stack Feature Development Workflow

You'll transform high-level feature requirements into a complete development plan covering API design, frontend implementation, testing strategy, and documentation. The skill helps you identify dependencies, parallelize work across frontend and backend teams, and establish quality gates that ensure features ship bug-free with proper error handling and logging.

Database Migration Helper
$45
SQL4.1(34)
Database Migration Helper

Transform schema and data changes into production-ready migration packages that protect data integrity and minimize downtime. You can handle column additions, renames, type conversions, and backfills using proven patterns like expand-contract and shadow tables. The skill generates explicit rollback scripts, validation checklists, and phased execution plans that keep applications stable throughout the migration.

NGS Data Analysis Pipeline Design & Troubleshooting
$30
NGS Data Analysis Pipeline Design & Troubleshooting

You can design end-to-end NGS pipelines tailored to your experiment type (WGS, WES, RNA-seq, targeted), troubleshoot pipeline failures by analyzing QC metrics and logs, and optimize performance by fine-tuning parameters and identifying bottlenecks. This skill handles the full workflow from raw sequencing data quality assessment through variant interpretation and annotation.

NoSQL Query Optimization & Performance Analysis
$45
NoSQL Query Optimization & Performance Analysis

You can analyze any NoSQL query—whether MongoDB, DynamoDB, Cassandra, or Firestore—to identify performance bottlenecks, missing indexes, and inefficient data access patterns. You'll receive structured recommendations with before/after comparisons, cost estimates, and refactored queries that dramatically improve performance and reduce database costs.

Bioanalytical Method Development Assistant
$35
Bioanalytical Method Development Assistant

You can rapidly design, optimize, and validate chromatographic and LC-MS/MS methods for analyzing drugs and metabolites in biological matrices. This skill guides you through analytical method development workflows—including parameter selection, sensitivity optimization, and regulatory strategy—while ensuring ICH Q2(R2) and FDA compliance throughout the development process.

$30.00