add missing indexes for speed
This commit is contained in:
parent
582ef63635
commit
e078b59503
1 changed files with 16 additions and 0 deletions
16
db/migrate/20151023143719_add_missing_indexes.rb
Normal file
16
db/migrate/20151023143719_add_missing_indexes.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
class AddMissingIndexes < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :topics, :user_id
|
||||
add_index :topics, :metacode_id
|
||||
add_index :synapses, [:node2_id, :node2_id]
|
||||
add_index :synapses, [:node1_id, :node1_id]
|
||||
add_index :synapses, :user_id
|
||||
add_index :synapses, :node1_id
|
||||
add_index :synapses, :node2_id
|
||||
add_index :mappings, [:map_id, :topic_id]
|
||||
add_index :mappings, [:map_id, :synapse_id]
|
||||
add_index :mappings, :map_id
|
||||
add_index :mappings, :user_id
|
||||
add_index :maps, :user_id
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue