Agent skill · data analytics · aj-geddes
sql-query-optimization
Analyze and optimize SQL queries for performance. Use when improving slow queries, reducing execution time, or analyzing query performance in PostgreSQL and MySQL.
Why this skill is useful
Provides specific optimization techniques and query analysis patterns for PostgreSQL and MySQL that the AI wouldn't reliably generate on its own.
What it needs
About 1k tokens when loaded. Last updated 2026-03-04. 307 stars on the source repository.
What this skill does
SQL Query Optimization Table of Contents Overview When to Use Quick Start Reference Guides Best Practices Overview Analyze SQL queries to identify performance bottlenecks and implement optimization techniques. Includes query analysis, indexing strategies, and rewriting patterns for improved performance. When to Use Slow query analysis and tuning Query rewriting and refactoring Index utilization verification Join optimization Subquery optimization Query plan analysis (EXPLAIN) Performance baseline establishment Quick Start PostgreSQL: Reference Guides Detailed implementations in the references/ directory: Guide Contents --- --- Analyze Current Performance Analyze Current Performance Common Optimization Patterns Common Optimization Patterns Query Rewriting Techniques Query Rewriting Techniques Batch Operations Batch Operations Best Practices ✅ DO Follow established patterns and conventions Write clean, maintainable code Add appropriate documentation Test thoroughly before deploying ❌ DON'T Skip testing or validation Ignore error handling Hard-code configuration values
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aj-geddes/sql-query-optimization