mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 18:13:39 +08:00
add indexes to assit with front page
This commit is contained in:
parent
162d94aa02
commit
216ecaaffd
8
db/migrate/20130910040235_index_topics_for_front_page.rb
Normal file
8
db/migrate/20130910040235_index_topics_for_front_page.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
class IndexTopicsForFrontPage < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :topics, [:deleted_at, :visible, :archetype, :id]
|
||||
# covering index for join
|
||||
add_index :topics, [:id, :deleted_at]
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in New Issue
Block a user