sql-master

Diagnose SQL queries and recommend indexes for performance optimization.

12|4|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/TurnaboutHero/oh-my-antigravity --skill sql-master
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-master
Source: https://github.com/TurnaboutHero/oh-my-antigravity/tree/main/skills/sql-master
Command: npx skills add https://github.com/TurnaboutHero/oh-my-antigravity --skill sql-master

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers and DBAs identify and fix SQL performance bottlenecks, design robust schemas, and implement scalable data models.

Core Features & Use Cases

  • Query Optimization: Diagnose slow queries, propose indexing strategies, and rewrite patterns for better execution plans.
  • Schema Design: Recommend normalization, relationships, and data modeling practices for scalable databases.
  • Advanced Queries: Provide patterns for complex analytics using window functions, CTEs, and joins.
  • Use Case: For a high-traffic e-commerce app, optimize the user_orders reporting query and redesign the orders schema to support fast lookups.

Quick Start

Pose a task like optimize the following query or design a schema: "Analyze the orders table and propose an index on (user_id, created_at) to improve reporting performance."

Frequently Asked Questions about sql-master

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize slow SQL queries?

Query optimization diagnoses performance bottlenecks by analyzing execution plans, recommending indexes on frequently filtered or joined columns, and rewriting patterns to reduce scans. Indexing on columns like user_id or created_at dramatically speeds up reporting and transactional queries across application scales.

What's the best way to design a scalable database schema?

Schema design applies normalization principles and relationship modeling to eliminate redundancy and support fast lookups. Proper structure reduces storage overhead, improves query performance, and handles growing data volumes without redesign.

When should I add indexes to my database?

Indexes accelerate queries on frequently filtered, sorted, or joined columns. Add indexes after identifying slow queries through performance analysis; composite indexes on (user_id, created_at) patterns are especially effective for reporting and high-traffic workloads.

How do I write complex analytical queries using window functions and CTEs?

Advanced query patterns using window functions and Common Table Expressions enable aggregations across rows, ranking, and multi-step transformations without repeated table scans. These techniques handle complex analytics efficiently on both transactional and analytical databases.

Can I apply schema optimization to both transactional and analytical databases?

Schema design and indexing strategies apply across transactional (OLTP) and analytical (OLAP) databases, though with different emphasis. Transactional schemas prioritize normalization and write performance; analytical schemas often denormalize for query speed.

What performance improvements can indexing deliver for reporting queries?

Strategic indexing reduces query execution time by orders of magnitude, enabling large reporting queries to run in seconds instead of minutes. Index selection depends on analyzing query patterns, join operations, and filter columns specific to your workload.