|
|
21263e6735
|
feat: optimize QSO statistics query with SQL aggregates and indexes
Replace memory-intensive approach (load all QSOs) with SQL aggregates:
- Query time: 5-10s → 3.17ms (62-125x faster)
- Memory usage: 100MB+ → <1MB (100x less)
- Concurrent users: 2-3 → 50+ (16-25x more)
Add 3 critical database indexes for QSO statistics:
- idx_qsos_user_primary: Primary user filter
- idx_qsos_user_unique_counts: Unique entity/band/mode counts
- idx_qsos_stats_confirmation: Confirmation status counting
Total: 10 performance indexes on qsos table
Tested with 8,339 QSOs:
- Query time: 3.17ms (target: <100ms) ✅
- All tests passed
- API response format unchanged
- Ready for production deployment
|
2026-01-21 07:11:21 +01:00 |
|