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:
10
db/migrate/20150523121319_introduce_indexes.rb
Normal file
10
db/migrate/20150523121319_introduce_indexes.rb
Normal 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
|
||||
Reference in New Issue
Block a user