Skip to content
This gem automatically logs SQL EXPLAIN of every queries
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
images
lib Bump v0.2.2 May 5, 2019
spec initial commit May 3, 2019
.gitignore initial commit May 3, 2019
.rspec initial commit May 3, 2019
.rubocop.yml initial commit May 3, 2019
.travis.yml initial commit May 3, 2019
Gemfile
Gemfile.lock Bump v0.2.2 May 5, 2019
LICENSE.txt initial commit May 3, 2019
README.md Update README.md May 5, 2019
Rakefile initial commit May 3, 2019
activerecord-explainer.gemspec

README.md

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

You can’t perform that action at this time.