summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-01-06 17:27:47 +0100
committerYorick Peterse <yorickpeterse@gmail.com>2016-01-07 14:53:02 +0100
commit7a240397afc56ab366b6c3504761fbf531b78ec1 (patch)
treee2f068cdb2f0558b0f0fc7c382ddef49961a1640 /db
parent61561a9eeb1dbb8273a1e8c8a5f37c0c01917c99 (diff)
downloadgitlab-ce-7a240397afc56ab366b6c3504761fbf531b78ec1.tar.gz
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')
-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