db: add updated_at index on wiki pages.
The wiki pages sidebar is ordered by updated_at. The sidebar is present on all wiki pages, so this improves load times for all wikis.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class AddUpdatedAtIndexOnWikiPages < ActiveRecord::Migration
|
||||
def change
|
||||
WikiPage.without_timeout do
|
||||
add_index :wiki_pages, :updated_at
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -7217,6 +7217,13 @@ CREATE UNIQUE INDEX index_wiki_pages_on_title ON wiki_pages USING btree (title);
|
||||
CREATE INDEX index_wiki_pages_on_title_pattern ON wiki_pages USING btree (title text_pattern_ops);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_wiki_pages_on_updated_at; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX index_wiki_pages_on_updated_at ON wiki_pages USING btree (updated_at);
|
||||
|
||||
|
||||
--
|
||||
-- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@@ -7562,3 +7569,5 @@ INSERT INTO schema_migrations (version) VALUES ('20170316224630');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20170319000519');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20170329185605');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user