# Indexes

> Analyze database queries and recommend missing indexes with performance impact analysis

- Skill: `majiayu000/indexes` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/indexes`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/indexes/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/indexes

---


# Database Index Analysis

**Current Time:** !`date`
**PostgreSQL:** !`psql --version`

**Scope:** `$ARGUMENTS` (or entire codebase if not specified)

Scan whole codebase and tell me what indexes are missing.

## 📚 **DOCUMENTATION REQUIREMENTS**

**Create comprehensive database analysis documentation at:**

- `docs/tasks/backend/DD-MM-YYYY/<semantic-db-id>/`

**Documentation Structure:**

- `README.md` - Database analysis overview and objectives
- `query-analysis.md` - Detailed query performance analysis
- `index-recommendations.md` - Missing indexes and impact analysis
- `performance-metrics.md` - Before/after performance comparisons
- `implementation-plan.md` - Index creation strategy and migration plan
- `monitoring-setup.md` - Performance monitoring and alerting

**Semantic Database Task ID Examples:**

- `user-query-optimization`
- `order-performance-indexes`
- `search-query-acceleration`
- `relationship-index-analysis`
- `slow-query-investigation`

Please analyze all database queries, identify missing indexes, and document recommendations according to the standards above.

$ARGUMENTS

