Database Indexing Strategy
Practical guide to PostgreSQL and MySQL indexing covering index type choice, composite and partial design, and maintenance.
- CCM score
- 37 of 100
- skills.sh installs
- 493
- GitHub stars
- 396
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers index creation planning, B-tree, Hash, GiST, and BRIN type selection, and full-text search index design
- Includes reference guides for PostgreSQL index types, MySQL index types, and single-column, composite, partial, and expression indexes
- Shows B-tree examples for equality and range queries, composite indexes, and partial indexes filtered on
cancelled_at IS NULL - Designed for developers optimizing query performance and storage in PostgreSQL or MySQL databases
Install
$ npx -y skills add aj-geddes/useful-ai-prompts --skill database-indexing-strategy -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Database Indexing Strategy
Table of Contents
Overview
Design comprehensive indexing strategies to improve query performance, reduce lock contention, and maintain data integrity. Covers index types, design patterns, and maintenance procedures.
When to Use
- Index creation and planning
- Query performance optimization through indexing
- Index type selection (B-tree, Hash, GiST, BRIN)
- Composite and partial index design
- Index maintenance and monitoring
- Storage optimization with indexes
- Full-text search index design
Quick Start
B-tree Indexes (Default):
-- Standard equality and range queries
CREATE INDEX idx_users_email ON users(email);
CREATE INDEX idx_orders_created_at ON orders(created_at DESC);
-- Composite indexes for multi-column queries
CREATE INDEX idx_orders_user_status
ON orders(user_id, status)
WHERE cancelled_at IS NULL;
Reference Guides
Detailed implementations in the references/ directory:
Details
- Repository
- github.com/aj-geddes/useful-ai-prompts
- Category
- Databases
- First seen
- Jun 3, 2026
Questions
What does the database-indexing-strategy skill do?
The database-indexing-strategy skill designs and implements database indexing strategies for PostgreSQL and MySQL. It covers index types such as B-tree, Hash, GiST and BRIN, composite and partial indexes, and index maintenance and monitoring.
How do I install the database-indexing-strategy skill?
Run npx -y skills add aj-geddes/useful-ai-prompts --skill database-indexing-strategy -y in your project. After that, database-indexing-strategy lets the agent create indexes, choose index types and tune index performance.
Which databases does the database-indexing-strategy skill support?
The database-indexing-strategy skill targets PostgreSQL and MySQL, with separate reference guides for the index types of each database. It also covers full-text search index design.
Where does the database-indexing-strategy skill stand in the Databases category?
The database-indexing-strategy skill is listed in the Databases category on Claude Marketplaces, alongside supabase-postgres-best-practices and several Prisma skills. Unlike those, it focuses on indexing design and index type selection rather than client APIs or database setup.
More from aj-geddes/useful-ai-prompts
All 258- Api Response Optimization492
- Accessibility Compliance491
- Background Job Processing491
- Git Workflow Strategy490
- Incident Response Plan490
- Zero Trust Architecture490
- Web Performance Optimization489
- Frontend State Management488
- File Upload Handling487
- Cross Platform Compatibility486
- Xss Prevention486
- Dns Management485
- Sentiment Analysis484
- Dependency Management483
- Batch Processing Jobs482
- Circuit Breaker Pattern482
- Aws Cloudfront Cdn481
- Mutation Testing481
- Csrf Protection480
- Developer Onboarding480
- Api Changelog Versioning479
- Concurrency Patterns479
- Deployment Automation479
- Django Application479
Similar to Database Indexing Strategy
More Databasespostgresql-database-engineeringmanutej/luxor-claude-marketplace1.8K installsComprehensive PostgreSQL engineering reference covering indexing, tuning, partitioning, replication, and production operations.
sql-optimization-patternswshobson/agents21.2K installsPractical SQL query tuning guide covering EXPLAIN analysis, index design, and common anti-pattern fixes.
database-query-optimizationaj-geddes/useful-ai-prompts596 installsPractical query tuning guide that uses EXPLAIN ANALYZE, indexing, and optimization checklists to cut response times.
postgresql-optimizationgithub/awesome-copilot17.5K installsPostgreSQL-specific guidance covering JSONB, arrays, range and geometric types, full-text search, and query tuning.