🤯 Very Eager Loading

The nuclear option for the N+1 query problem.

How it works

Very Eager Loading intelligently preloads database queries without the need to specify eager loading such as includes, eager_load and preload.

Very Eager Loading achieves this by preloading every related database table for every query.

Installation

Add this line to your application's Gemfile:

gem 'very_eager_loading'

And then execute:

$ bundle

Disabling Very Eager Loading

If you would like to see those Bullet N+1 warnings again, you can disable Very Eager Loading by uninstalling the gem.