Commit 641a9594e33129834b85c95dd779f01eddba991b

Authored by Braulio Bhavamitra
1 parent 8c31af4c

performance: index user_id on profiles

Select filter query from 8ms to 1ms
db/migrate/20150712130827_index_user_id_on_profiles.rb 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +class IndexUserIdOnProfiles < ActiveRecord::Migration
  2 +
  3 + def change
  4 + add_index :profiles, :user_id
  5 + add_index :profiles, [:user_id, :type]
  6 + end
  7 +
  8 +end
... ...