From 1867442fbc3174c80b74b95112abfedc0e0527ee Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 24 Nov 2016 10:11:39 +0800 Subject: [PATCH] PERF: Add score indexes for top topics. --- .../20161124020918_add_scores_indexes_to_top_topics.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20161124020918_add_scores_indexes_to_top_topics.rb diff --git a/db/migrate/20161124020918_add_scores_indexes_to_top_topics.rb b/db/migrate/20161124020918_add_scores_indexes_to_top_topics.rb new file mode 100644 index 00000000000..0e79373d230 --- /dev/null +++ b/db/migrate/20161124020918_add_scores_indexes_to_top_topics.rb @@ -0,0 +1,9 @@ +class AddScoresIndexesToTopTopics < ActiveRecord::Migration + def change + add_index :top_topics, :daily_score + add_index :top_topics, :weekly_score + add_index :top_topics, :monthly_score + add_index :top_topics, :yearly_score + add_index :top_topics, :all_score + end +end