Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-01-06 19:27:47 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2016-01-07 16:53:02 +0300
commit7a240397afc56ab366b6c3504761fbf531b78ec1 (patch)
treee2f068cdb2f0558b0f0fc7c382ddef49961a1640 /db/migrate
parent61561a9eeb1dbb8273a1e8c8a5f37c0c01917c99 (diff)
Added an index on milestones.title
Certain pages (e.g. the group wide issues page) filter miletones by their title. Without an index this will result in a sequence scan on a large dataset increasing the total loading time of a page.
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20160106162223_add_index_milestones_title.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/db/migrate/20160106162223_add_index_milestones_title.rb b/db/migrate/20160106162223_add_index_milestones_title.rb
new file mode 100644
index 00000000000..767885e2aac
--- /dev/null
+++ b/db/migrate/20160106162223_add_index_milestones_title.rb
@@ -0,0 +1,5 @@
+class AddIndexMilestonesTitle < ActiveRecord::Migration
+ def change
+ add_index :milestones, :title
+ end
+end