Commit 608ddc9dfd943981559cdd26efc827c61d78f9c4

Authored by Braulio Bhavamitra
2 parents 31430d6c 641a9594

Merge branch 'index-user-id' into 'master'

performance: index user_id on profiles

Select filter query from 8ms to 1ms

See merge request !621
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
... ...