Skip to content

Better N+1 Query Detection for ActiveRecord

Published: at 11:00 PM

Bullet is a well-known gem for preventing n+1 queries (and useless eager loading) cases in Ruby on Rails applications. However, a newer alternative exists: prosopite. This gem promises a better coverage and less false positives than bullet, due to a different core implementation mechanism. As of today, it appears to be well maintained and without any breaking issues.

If you prefer a more aggressive approach which prevents n+1 queries in the first place, consider using strict loading built into Rails.