No commit activity in last 3 years
No release in over 3 years
This gem automatically logs SQL EXPLAIN of every queries. You can check naturally every SQL EXPLAIN from development log, without manually executions.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 13.0
~> 3.0

Runtime

 Project Readme

ActiveRecord::Explainer

This gem automatically logs SQL EXPLAIN of every queries.

You can check naturally every SQL EXPLAIN from development log, without ✋ executions.

Usage

If you use Rails, it's no configuration, and you can logs SQL EXPLAIN of every queries.

Installation

Add this line to your application's Gemfile:

gem 'activerecord-explainer', group: :development

And then execute:

$ bundle

Or install it yourself as:

$ gem install activerecord-explainer

How it work?

  • This gem subscribes sql.active_record event provided by the Active Support instrumentation API.
  • Subscriber handles payload, and execute EXPLAIN from ActiveRecord::Base.

Please check the implementation, if you interested in.

License

MIT License