Home/Skills/Database Indexing Strategist
Cursor
.cursorrules
Database
Verified

Database Indexing Strategist

Design optimal indexes for PostgreSQL, MySQL — B-tree, GiST, GIN, partial, and composite indexes.

Cursor
Claude Code

Quick Info

File Type:.cursorrules
Platform:Cursor
Author:MCP Directory
Category:Database

What 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

#database
#indexing
#postgres
#mysql
#performance

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:

  1. Create a file named .cursorrules in your project root
  2. Copy the skill code above and paste it into the file
  3. Save and Cursor will apply these rules automatically

Recommended MCP Servers

These MCP servers work great with this skill

Related Skills

Claude Code

Database Schema Designer

Designs normalized database schemas with proper indexing, constraints, and migration patterns.

Claude Code

Prisma ORM Expert

Prisma ORM specialist — schema design, migrations, type-safe queries, and PostgreSQL/MySQL optimization.

Cursor

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.