Sql Query Optimizer

    by Timoranjes

    1

    Expert-level SQL tuning and performance auditing for PostgreSQL, MySQL, SQLite, and SQL Server.

    $14.99

    · or 75 credits

    30-day refund guarantee

    Secure checkout via Stripe

    0 installsNo reviews yet

    Works with the AI tools you already use

    CClaude CodeCCursorCCodex CLIGGitHub CopilotGGemini CLIVVS CodeWWindsurf+15 more

    About this skill

    What it does

    This skill transforms your AI agent into a senior database performance engineer. It provides a systematic methodology for diagnosing slow SQL queries, interpreting complex execution plans, and rewriting code for maximum efficiency across PostgreSQL, MySQL, SQLite, and SQL Server.

    Why use this skill

    Standard LLMs often suggest generic SQL adjustments that might not actually trigger index usage or could even degrade write performance. This skill implements a developer-centric workflow: it demands EXPLAIN plans, identifies specific anti-patterns like non-sargable predicates and N+1 loops, and provides concrete before/after benchmarks. It ensures your agent understands dialect-specific nuances, such as how MySQL handles implicit type casts versus PostgreSQL's CTE materialization strategies.

    Key Features

    • Execution Plan Analysis: Deep interpretation of EXPLAIN ANALYZE and SCAN TABLE outputs.
    • Index Strategy: Recommendations for composite and covering indexes based on read-to-write ratios.
    • Query Refactoring: Converting slow correlated subqueries into efficient joins and implementing keyset pagination.
    • Anti-Pattern Detection: Automatic flagging of 'SELECT *', wildcard prefixes, and improper NULL handling.

    The Output

    The agent delivers a structured performance report including the optimized SQL, the specific reasoning for each change, detailed index recommendations, and an estimated performance delta (e.g., Seq Scan to Index Scan transition).

    Details

    How to install

    Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.

    Reviews

    No reviews yet - be the first to share your experience.

    Only users who have downloaded or purchased this skill can leave a review.

    Security Scanned

    Passed automated security review

    Permissions

    Terminal / Shell

    Allowed Hosts

    www.postgresql.org
    dev.mysql.com
    www.sqlite.org
    learn.microsoft.com
    use-the-index-luke.com
    www.brentozar.com

    File Scopes

    sql-query-optimizer/**

    Creator

    Frequently Asked Questions

    Browse More Skills