PERF04-BP04 - Optimize query patterns, indexes, and schema
Implementation Guidance
“Optimize query patterns, indexes, and schema” helps remove wasted effort, unused capacity, and inefficient patterns that degrade cost and performance outcomes. Focus on continuous tuning backed by observed workload behavior rather than one-time adjustments.
For the question “How do you select your database solution?”, define measurable outcomes, assign owners, and review execution regularly. Integrate this practice into delivery and operations processes so improvements persist as workloads and requirements evolve.
Key Steps
-
Identify optimization targets:
- Profile current-state systems related to “Optimize query patterns, indexes, and schema”
- Prioritize bottlenecks and waste by business impact
- Define target utilization and performance goals
-
Apply targeted improvements:
- Implement architectural, configuration, or code-level optimizations
- Use staged rollout to verify gains and limit risk
- Capture before-and-after metrics for each change
-
Sustain gains over time:
- Automate periodic review and regression detection
- Retire ineffective optimizations and scale successful patterns
- Continuously refine targets as workload characteristics evolve
Risk / Impact
Level of risk if not implemented: Medium
Impact: Without this best practice, workloads typically accumulate inefficiencies and execution drift that increase failure probability over time. Problems often surface during traffic spikes, major releases, or dependency failures.
Benefits of implementation:
- More predictable operational and engineering outcomes
- Better alignment between architecture decisions and business goals
- Continuous improvement through measurable feedback loops
AWS Services to Consider
Amazon RDS
Runs managed relational databases with backups, patching, and scaling options.
Amazon Aurora
Provides high-performance relational database engines with fast failover.
Amazon DynamoDB
Delivers serverless key-value performance at scale with low-latency access.
Amazon ElastiCache
Improves read and response performance using in-memory caching.