Guides SQL query optimization through execution plan analysis and common rewrite patterns. Covers subquery-to-JOIN conversion, CTE materialization control, OR-to-UNION, NOT IN-to-NOT EXISTS, pagination optimization, and SELECT * elimination. Uses analyze_query with format and settings parameters for deep plan analysis.
$npx -y skills add isdaniel/pgtuner_mcp --skill pg-query-rewriteInstalls into the current project.
Run `npx skills use "https://github.com/isdaniel/pgtuner_mcp" --skill "isdaniel/pgtuner_mcp/pg-query-rewrite"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/isdaniel/pgtuner_mcp" that are relevant to the current task. Run `npx skills add "https://github.com/isdaniel/pgtuner_mcp"` and select the relevant skills, then follow their instructions.