index_strategy_patterns

Database indexes are critical for query performance, but they come with trade-offs. This guide covers proven patterns for index design, optimization strategies, and common pitfalls to avoid.

Content Preview
# Index Strategy Patterns

## Overview

Database indexes are critical for query performance, but they come with trade-offs. This guide covers proven patterns for index design, optimization strategies, and common pitfalls to avoid.

## Index Types and Use Cases

### B-Tree Indexes (Default)

**Best For:**
- Equality queries (`WHERE column = value`)
- Range queries (`WHERE column BETWEEN x AND y`)
- Sorting (`ORDER BY column`)
- Pattern matching with leading wildcards (`WHERE column LIKE 'prefix%'
How to Use

Recommended: Install to project (local)

mkdir -p .claude/skills
curl -o .claude/skills/index_strategy_patterns.md \
  https://raw.githubusercontent.com/alirezarezvani/claude-skills/main/engineering/database-designer/references/index_strategy_patterns.md

Skill is scoped to this project only. Add .claude/skills/ to your .gitignoreif you don't want to commit it.

Alternative: Clone full repo

git clone https://github.com/alirezarezvani/claude-skills

Then reference at engineering/database-designer/references/index_strategy_patterns.md

Related Skills