← All tasks
🌳
Programming Intermediate

Resolving the N+1 Query Problem

⏱ 3 min ⭐ 70 XP 🔁 3 attempts allowed

What you'll do

Pick the correct fix for a classic Eloquent performance issue.

Scenario

A blog index page loops over 50 posts and calls $post->author->name inside the loop, firing 51 queries total.

Ready to try it?

Create a free account and try "Resolving the N+1 Query Problem" free for 7 days, no card required. Earn 70 XP and track your internship progress.

Already have an account? Sign in