Commit
608ddc9dfd943981559cdd26efc827c61d78f9c4
Exists in
master
and in
22 other branches
angular_poc, api-article-archived, article-readonly, backup-7-jan-2016, captcha_serpro_plugin, content-manager-hostspot, export-comment-paragraph, fix_event_date_issue, login-captcha, master_rails3, new_video_plugin, pg_search_rank, production, refactor_with_role, refactor_with_role_scope, remove_profile_cat_icons, resend_confirmation_email, staging, staging_rails3, tasks_keep_filter_params, theme-brasil-digital-from-staging, travis
Merge branch 'index-user-id' into 'master'
performance: index user_id on profiles
Select filter query from 8ms to 1ms
See merge request !621
| @@ -0,0 +1,8 @@ |
| @@ -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 |