• Stars
    star
    492
  • Rank 89,476 (Top 2 %)
  • Language
    Ruby
  • License
    MIT License
  • Created about 15 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.

DEPRECATED

This gem doesnโ€™t really work on Rails 4 โ€“ no plans on upgrading it anyway. you probably should take a look at lol_dba

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 may be more fields depending on your application design and custom queries.

Rails 3.x and 4.x

If youโ€™re using Rails 3.x or 4.x, you probably should take a look at lol_dba

Installation

as a rails plugin:

script/plugin install git://github.com/eladmeidar/rails_indexes.git

Usage

Display a migration for adding/removing all necessary indexes based on associations:

rake db:index_migration

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):

rake db:find_query_indexes

Note that it would probably make more sense running those tasks on production, where you actually need those indexes to be added.

Tests

Requires SQLite3 installed, then just:

rake

to run the tests

Author:

Elad Meidar โ€“ http://blog.eizesus.com

Thanks:
Eric Davis โ€“ http://littlestreamsoftware.com

Released under the same license as Ruby. No Support. No Warranty, no Pain.

More Repositories

1

PlainViews

an ActiveRecord migration DSL for creating database views
Ruby
23
star
2

sinatra_fake_webservice

Run a sinatra app in your test environment that will operate as a Fake web service
Ruby
14
star
3

CannedCukes

A place to host Cucumber features and scenarios, search in other people's code to find cool testing ideas
Ruby
9
star
4

productivity_ftw

tired of wasting your time on Facebook/Twitter/whatever? use this Ruby server to stop screwing around and get things done! productivity is at your fingertips
Ruby
8
star
5

StockTwits

StockTwits API wrapper
Ruby
7
star
6

sinatra-mvc

An Agile Sinatra-based MVC app (skeleton)
Ruby
5
star
7

MongoMysqlRelations

Allows associations between Mongoid and MySQL models
Ruby
5
star
8

railsbridge-site

Awesome railsbridge community site
Ruby
4
star
9

blackbird_rails

Add the blackbird javascript logger library to your rails project
JavaScript
3
star
10

model_plus

Improved Rails model generator
Ruby
2
star
11

EmphasizedInsanity

My blog
Ruby
2
star
12

tutorial

Tutorial that's been on old for too long
JavaScript
2
star
13

twonk-list

The Twonk List
Ruby
2
star
14

SubstructRescue

Trying to rescue the dead "Substruct" Rails e-commerce project
Ruby
2
star
15

logga-bot

The logga bot!
Ruby
2
star
16

relational_scope

allows the usage of scopes from a relation's models for filtering
Ruby
2
star
17

gmaps_proxy

A Simple GoogleMaps proxy to bypass some API restrictions in some countries (ex: Israel)
Ruby
2
star
18

mini

a ruby eventmachine bot inspired by richard jones' irccat. also logs channels. history and webhooks via sinatra.
Ruby
2
star
19

twitter_creeper

Chrome extension to flag and gett notified when an incoming DM comes from a creeping user that send inappropriate message
JavaScript
2
star
20

RemmiRB

client server card-remmi ruby implementation
Ruby
1
star
21

react-dates-example

Created with StackBlitz โšก๏ธ
JavaScript
1
star
22

TeamConsole

1
star
23

OverAchiever

An achievement framework for Rails
Ruby
1
star
24

GitTraining

Ori is a noob
1
star
25

TeachingGit

1
star
26

TomGit

Training Git for Tom
1
star
27

RedisTags

A redis graph based implementation of a tagging system
Ruby
1
star
28

failtail

Ruby
1
star
29

rails-org-il

Ruby on Rails home page in Israel
1
star
30

rails_indexes_test_app

A Test application for RailsIndexes
Ruby
1
star
31

posenet_drumset

Playing drums through webcam
JavaScript
1
star
32

cukecan

TODO: one-line summary of your gem
Ruby
1
star
33

rails3-bugmash

Rails 3 bugmash playground
Ruby
1
star