PERF: slow user pages in admin. add an index for trust level 3 calculations, and memoize query results

This commit is contained in:
Neil Lalonde
2015-01-19 15:30:16 -05:00
parent 7412ff4da7
commit 4c0129ccdd
2 changed files with 15 additions and 10 deletions

View File

@@ -0,0 +1,5 @@
class AddPostsIndexIncludingDeleted < ActiveRecord::Migration
def change
add_index :posts, [:user_id, :created_at]
end
end