Query insights

The query that is costing you,
and where it runs

Slow queries ranked by what they actually cost you: the time per call multiplied by how often it is called. The one that runs four hundred times at 12ms beats the one that runs once at two seconds.

✔︎ 14-day free trial ✔︎ No credit card required

Queries

Statement Total time ↓
  • select * from `product_variants` where `product_id` = ?

    WW whiskerworks.shop GET /collections/{slug} N+1

    38.2s
  • select * from `orders` where `user_id` = ? order by `created_at` desc

    DS driftwoodstays.com GET /api/orders Missing index

    21.7s
  • update `inventory` set `stock` = `stock` - ? where `sku` = ?

    WW whiskerworks.shop POST /checkout

    9.4s
  • select count(*) as aggregate from `reviews` where `product_id` = ?

    WW whiskerworks.shop GET /collections/{slug} N+1

    7.1s
  • insert into `jobs` (`queue`, `payload`, `attempts`, `available_at`) values (?, ?, ?, ?)

    DS driftwoodstays.com POST /api/webhooks/mollie

    2.3s
  • select * from `sessions` where `id` = ? limit 1

    WW whiskerworks.shop 14 routes

    1.9s
Query insights

Every statement, and the ones that cost you

All features

N+1s, named

The same query shape repeated inside one request is the signature of a missing eager load. LaraBug normalises the shapes, so bindings do not split one query into thousands, counts the repeats and ranks the endpoints each one runs on, with the bindings on the occurrence when you need them.

Keep reading

Catch the next bug before your users do

Two minutes to install, a free plan that stays free, and your data kept in the EU. Teams have trusted LaraBug with their Laravel errors since 2016.