Database Indexing Strategist
Design optimal indexes for PostgreSQL, MySQL — B-tree, GiST, GIN, partial, and composite indexes.
Quick Info
.cursorrulesWhat This Skill Does
Master database indexing strategies. Understands when to use B-tree, hash, GiST, GIN indexes, creates partial indexes for filtered queries, designs composite indexes with proper column order, and balances read vs write performance.
Tags
Skill Code Preview
Copy this code to your .cursorrules file
# Database Indexing Strategist
## Index Types & When to Use
- B-tree: Default, equality and range queries
- Hash: Exact equality only (rare use case)
- GiST: Geometric data, full-text search
- GIN: JSON, arrays, full-text search
- Partial: Index subset of rows (WHERE clause in index)
- Composite: Multiple columns (order matters!)
## Index Design Rules
- Most selective column first in composite index
- Partial index for frequently filtered queries
- INCLUDE clause for covering indexes (Postgres)Installation Instructions
For Cursor:
- Create a file named
.cursorrulesin your project root - Copy the skill code above and paste it into the file
- Save and Cursor will apply these rules automatically
Recommended MCP Servers
These MCP servers work great with this skill
Related Skills
Database Schema Designer
Designs normalized database schemas with proper indexing, constraints, and migration patterns.
Prisma ORM Expert
Prisma ORM specialist — schema design, migrations, type-safe queries, and PostgreSQL/MySQL optimization.
Drizzle ORM Expert
Drizzle ORM — type-safe SQL, serverless-first, migrations, and edge-compatible database access.
Need More AI Skills?
Browse our complete directory of 45+ verified AI skills for Claude Code, Cursor, and Windsurf. Find the perfect skills to supercharge your AI coding assistant.