
I built a free Laravel package that auto-detects N+1 queries, slow queries & missing indexes
If you've ever shipped a Laravel feature and later discovered it was firing 200 queries per page — this package is for you. I just released laravel-db-monitor , a free open-source package that silently watches every HTTP request and automatically flags database performance issues. 🔍 What It Detects 🐢 Slow Queries Flags any query exceeding your threshold (default: 500ms). Marks it as critical if it's 5x over the limit. 🔁 N+1 Queries The most common Laravel performance bug. Detects when the same query pattern runs 10+ times in a single request — something that's completely invisible without a tool like this. 📭 Missing Indexes Watches your real query patterns and tells you exactly which columns need indexes based on actual usage — not guesswork. ⚡ How It Works Install it and register one middleware. That's it. It runs silently in the background on every request. Then run: php artisan db:report And you see this: ▶ SLOW QUERY ● Slow query detected: 2300ms — Path: api/orders ● Slow query det
Continue reading on Dev.to Webdev
Opens in a new tab



