Advanced SQL Performance & Architecture

•
122
•

Optimizes SQL queries and database structures by applying Staff-level DBA patterns and execution plan analysis.

This skill elevates Claude's SQL writing capabilities to a Staff+ DBA level by focusing on the complex, performance-critical patterns often missed by default AI models. It provides specialized guidance on advanced indexing strategies, efficient pagination, complex aggregations using the FILTER clause, and the prevention of silent production performance killers like implicit type casting or incorrect NULL handling in subqueries. Whether you are reviewing a slow query for a performance bottleneck or designing a high-scale data schema, this skill ensures your SQL is written with the execution plan and database engine internals in mind.

Key Features

01Advanced index optimization including operator class selection and INCLUDE clauses
02Database planner optimization via multi-column extended statistics
03Implementation of high-performance keyset pagination for large datasets
04Detection and remediation of silent query anti-patterns and index-bypassing functions
05Complex aggregation patterns using FILTER, ROLLUP, CUBE, and GROUPING SETS
06122 GitHub stars

Use Cases

01Writing complex analytics queries using advanced grouping and conditional aggregations
02Optimizing a slow production query by analyzing its execution plan and indexing
03Refactoring large-scale data pagination from OFFSET to keyset-based approaches