Suggest-Db-Indices
A gem for your rails project that suggests indices for you to add in your database. Currently it suggests adding indexes to unindexed foreign keys.
Installation
Add this line to your application's Gemfile:
gem 'suggest-db-indices'
And then execute:
$ bundle
Or install it yourself as:
$ gem install suggest-db-indices
Usage
- rails console
- require 'suggest_db_indices'
- SuggestDbIndices.go!
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Possible future features
- I have built some things for analyzing the rails log files and looking at columns used in the queries that get run. I need to come up with a good way to use these results.
- Next to each add index statement, there should be a justification.