Excessive database queries slow response times
warningperformanceUpdated Dec 3, 2024(via Exa)
How to detect:
Application makes excessive database queries instead of using lazy loading, batching, or caching, resulting in slow response times and increased database load.
Recommended action:
Implement lazy loading using SQLAlchemy's joinedload() to load related objects only when needed. Use query batching and caching to reduce database roundtrips. Add event listeners to automatically configure lazy loading for queries.