1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-07 06:54:16 +00:00

Added indexes on the frequent queries. The problem is still too many queries.

This commit is contained in:
RJ Osborne
2015-05-23 08:48:13 -04:00
parent 2a57cafd6d
commit bec751c4fd
2 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
class IntroduceIndexes < ActiveRecord::Migration
def change
add_index :weights, :tournament_id
add_index :schools, :tournament_id
add_index :mats, :tournament_id
add_index :matches, :tournament_id
add_index :matches, [:w1, :w2], :unique => true
add_index :wrestlers, :weight_id
end
end