logo
podcast Podcast
get help Get Unstuck

Lazy loading protection does not catch all duplicate queries

I discovered this one the hard way

Joel Clermont
Joel Clermont
2025-09-19

Laravel has some nice protections against unintentional lazy loading (the dreaded "N+1" query), but it can't catch every possible duplicate query you might accidentally introduce.

In today's video, I show a real example of the type of bug that can slip through and make a case for why you should remain diligent when writing database access code inside of loops.

Watch Now (4 min)

And after watching, don't forget to subscribe to our YouTube channel, so you don't miss future videos.

Here to help,

Joel

P.S. Would you like a performance review of your application? Let's talk.

Toss a coin in the jar if you found this helpful.
Want a tip like this in your inbox every weekday? Sign up below 👇🏼
email
No spam. Only real-world advice you can use.