⚡ ️Database Tip
Sometimes rough estimates about the resulting number of rows for a query are enough. You can just use the EXPLAIN prediction instead of running the (slow) query. The accuracy depends on the complexity of your query, tables, indexes, etc. Test first.
#Laravel If your site is slow and you think database queries might be the issue. You can listen to database queries.
In this example, I'm logging the time and the file location of every query. This should help you find the slow query a little bit easier.
📦🚀Just released a new package called "Slow Query Notifier"
Get notified if your Laravel app ever runs a really slow database query. The goal of this package is to provide developer peace of mind. ✌️🧠
Check it out:
thomaskane.io/laravel-slow-q…