Follow-up · depth 2
What metrics prove Eager vs Explicit Loading is healthy in prod?
What metrics prove Eager vs Explicit Loading is healthy in prod?
Answers use simple, clear English.
Quick interview answer
Prove Eager vs Explicit Loading is healthy with latency (p50/p95/p99), error/saturation rates, and queue/event-loop lag — not just CPU. Context: Mitigate first, then root-cause. Check symptoms against: Lazy loading enabled globally causing hidden N+1 in foreach..
Detailed answer
Production health signals for Eager vs Explicit Loading: • Latency: p50/p95/p99 of the critical path that uses Eager vs Explicit Loading. • Errors: failure rate, timeouts, and retry storms. • Saturation: queue depth, event-loop delay, thread/pool utilization. • Business SLIs: request success and user-visible freshness where relevant. Trade-off lens: Pros: Include gives predictable SQL; projection Select reduces over-fetching. Cons: Cartesian explosion with multiple Includes — use split queries. Explain thresholds + alerts, then how you triage. Parent context: Mitigate first, then root-cause. Check symptoms against: Lazy loading enabled globally causing hidden N+1 in foreach..
Full explanation
Good answers name measurable signals and what “bad” looks like for Eager vs Explicit Loading. Include/ThenInclude eager-loads related data in one query. Explicit loading: reference/load after query. Avoid lazy loading in web apps (N+1 in loops).
Follow-up questions
Only answered follow-ups are shown — click to open with full answers
Parent context — Eager vs Explicit Loading
Mitigate first, then root-cause. Check symptoms against: Lazy loading enabled globally causing hidden N+1 in foreach..
View full parent question →