Performance
Optimize for speed without sacrificing clarity
Enforceable guidelines from our catalog
Database Queries Must Have Optimized Indexes for Large Datasets
All JPA queries must have appropriate indexes designed for expected data volumes, with composite indexes for multi-column filters using @Index annotations and covering indexes for read-heavy workloads to maintain sub-second query performance.
Query Performance Must Be Profiled and Monitored
All database queries must be profiled using Hibernate statistics, P6Spy, or custom JPA interceptors for execution time, I/O costs, and resource usage with automated alerts for queries exceeding performance thresholds or showing degradation over time.
Bulk Operations Must Use Infrastructure-Appropriate Batch Sizes
All bulk database operations using Spring Batch, JPA batch processing, or custom batch implementations must implement dynamic batch sizing based on infrastructure capabilities, network latency, and memory constraints to optimize throughput without overwhelming systems.
and get unlimited access to our guidelines catalog