ActiveRecord extension that implements USE INDEX and FORCE INDEX.
How to use
Add it to your Gemfile
.
# ...
gem 'active-record-forcible-index'
# ...
Having the model bellow:
class DummyModel < ActiveRecord::Base
require 'active_record_forcible_index'
end
You can use #use_index
or #force_index
by invoking:
# code here
DummyModel.all.use_index('dummy_index')
# code here
Note: Get dummy_index value from your SQL database.
Authors
Catalin Ilinca and Alexandru Emil Lupu
Contributing
Thanks to our contributors.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request