What problem does it solve?
Poor database design leads to slow queries, data inconsistencies, and difficult migrations, costing valuable development time and impacting user experience. This skill provides best practices for schema design, indexing, and query optimization to build robust and performant databases.
Core Features & Use Cases
- Schema Design: Guidance on normalization vs. denormalization, appropriate data types, and effective primary/foreign key usage.
- Indexing Strategies: Best practices for various index types (B-Tree, Hash, GIN) and composite indexes to accelerate common queries.
- Query Optimization: Techniques to avoid the N+1 query problem, use
EXPLAIN ANALYZE effectively, and write efficient SQL.
- Use Case: When designing a new database schema for a critical application, use this skill to ensure proper normalization, select optimal data types, and plan effective indexing for peak performance.
- Use Case: Identify and resolve slow queries in an existing application by applying profiling techniques and optimization patterns.
Quick Start
This is a knowledge skill, auto-activated by relevant keywords.
To get guidance on database design, simply ask:
"What are the best practices for database schema normalization?"
"How can I optimize a slow SQL query?"