Commit
641a9594e33129834b85c95dd779f01eddba991b
Exists in
staging
and in
26 other branches
angular_poc, api-article-archived, api-homepage, api_visitor, article-readonly, caching-rails4, captcha_serpro_plugin, comment_paragraph_api, comments_api_reply, content-manager-hostspot, environment-api, export-comment-paragraph, fix_event_date_issue, fix_multitenancy, fix_profile_wall, fix_string_downcase_and_upcase, fix_upload_files_on_development_environment, json_cookie_serializer, login-captcha, master, new_security, new_video_plugin, pg_search_rank, production, resend_confirmation_email, tasks_keep_filter_params
performance: index user_id on profiles
Select filter query from 8ms to 1ms
| @@ -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 |