Sha256: e10c48bd72c2e0eaee20b9c0775cad73bdfed5cf69903fa76c1dd9bfeeccb8cf
Contents?: true
Size: 1.46 KB
Versions: 47
Compression:
Stored size: 1.46 KB
Contents
h1. Rails Indexes Rails indexes is a small package of 2 rake tasks that scan your application models and displays a list of columns that _probably_ should be indexed. note: there should be mode fields depending on your application design and custom queries. h2. Installation as a rails plugin: <pre>script/plugin install git://github.com/eladmeidar/rails_indexes.git</pre> h2. Usage <del>Display a simple report:</del> <pre><del>rake db:show_me_some_indexes</del></pre> - *deprecated* Display a migration for adding/removing all necessary indexes based on associations: <pre>rake db:show_me_a_migration</pre> Display a migration for adding/removing all necessary indexes based on AR::Base#find calls (including: find, find_by, find_all_by, find_by_x_and_y, find_all_by_x_and_y): <pre>rake db:show_me_ar_find_indexes</pre> Note that it would probably make more sense running those tasks on production, where you *actually* need those indexes to be added. * Add an option to create a migration that adds all the needed indexes. * Add an option to scan the application root tree for #find, #find_all_by and #find_by to get some more index-required columns. h2. Tests Requires SQLite3 installed, then just: <pre>rake</pre> to run the tests h4. Author: Elad Meidar "http://blog.eizesus.com":http://blog.eizesus.com Thanks: Eric Davis, "http://littlestreamsoftware.com":http://littlestreamsoftware.com Released under the same license as Ruby. No Support. No Warranty, no Pain.
Version data entries
47 entries across 47 versions & 2 rubygems