DB Performance Audit 5: Caching, Batching, and Architectural Improvements

@mwalek · Apr 25, 2026
Prompt for auditing missing caching, batching opportunities, repeated reads, architectural improvements, and repository or service patterns that cause unnecessary database load.
1

Prompt

Sign in to save

Saving keeps a copy in your free Symbol library, ready to use from your AI assistant.

Audit the codebase for missing opportunities to reduce database load through architecture improvements. Focus on:
- missing caching for frequently requested data,
- repeated reads of stable or rarely changing data,
- missing batching where many small queries are used,
- places where database access could be reduced through better design,
- repository or service-layer patterns that lead to unnecessary database calls.

For each issue:
- show the file and code snippet,
- explain why the current approach causes avoidable database load,
- describe the likely impact,
- suggest a concrete improvement such as caching, batching, denormalization, or refactoring.

Also classify each finding as:
- must fix,
- should fix,
- nice to improve.

Prefer findings with real performance impact over theoretical concerns.

**Goal:** Reduce overall database pressure by improving how the application retrieves and reuses data.