PERF: last seen index on users

This commit is contained in:
Sam 2014-08-07 13:33:11 +10:00
parent 022109bc76
commit b5045a005f
4 changed files with 12 additions and 0 deletions

View File

@ -250,6 +250,7 @@ end
# badge_grouping_id :integer default(5), not null
# trigger :integer
# show_posts :boolean default(FALSE), not null
# system :boolean default(FALSE), not null
#
# Indexes
#

View File

@ -784,6 +784,7 @@ end
#
# index_users_on_auth_token (auth_token)
# index_users_on_last_posted_at (last_posted_at)
# index_users_on_last_seen_at (last_seen_at)
# index_users_on_username (username) UNIQUE
# index_users_on_username_lower (username_lower) UNIQUE
#

View File

@ -95,4 +95,9 @@ end
# bio_cooked :text
# dismissed_banner_key :integer
# profile_background :string(255)
# bio_cooked_version :integer
#
# Indexes
#
# index_user_profiles_on_bio_cooked_version (bio_cooked_version)
#

View File

@ -0,0 +1,5 @@
class AddIndexOnLastSeenToUsers < ActiveRecord::Migration
def change
add_index :users, [:last_seen_at]
end
end