Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
97739f15
Commit
97739f15
authored
Feb 12, 2017
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add indices to improve loading of labels page
parent
edb8ed36
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
changelogs/unreleased/sh-add-labels-index.yml
changelogs/unreleased/sh-add-labels-index.yml
+4
-0
db/migrate/20170210062829_add_index_to_labels_for_title_and_project.rb
...170210062829_add_index_to_labels_for_title_and_project.rb
+12
-0
db/schema.rb
db/schema.rb
+2
-0
No files found.
changelogs/unreleased/sh-add-labels-index.yml
0 → 100644
View file @
97739f15
---
title
:
Add indices to improve loading of labels page
merge_request
:
author
:
db/migrate/20170210062829_add_index_to_labels_for_title_and_project.rb
0 → 100644
View file @
97739f15
class
AddIndexToLabelsForTitleAndProject
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
change
add_concurrent_index
:labels
,
:title
add_concurrent_index
:labels
,
:project_id
end
end
db/schema.rb
View file @
97739f15
...
@@ -581,6 +581,8 @@ ActiveRecord::Schema.define(version: 20170210075922) do
...
@@ -581,6 +581,8 @@ ActiveRecord::Schema.define(version: 20170210075922) do
add_index
"labels"
,
[
"group_id"
,
"project_id"
,
"title"
],
name:
"index_labels_on_group_id_and_project_id_and_title"
,
unique:
true
,
using: :btree
add_index
"labels"
,
[
"group_id"
,
"project_id"
,
"title"
],
name:
"index_labels_on_group_id_and_project_id_and_title"
,
unique:
true
,
using: :btree
add_index
"labels"
,
[
"type"
,
"project_id"
],
name:
"index_labels_on_type_and_project_id"
,
using: :btree
add_index
"labels"
,
[
"type"
,
"project_id"
],
name:
"index_labels_on_type_and_project_id"
,
using: :btree
add_index
"labels"
,
[
"project_id"
],
name:
"index_labels_on_project_id"
,
using: :btree
add_index
"labels"
,
[
"title"
],
name:
"index_labels_on_title"
,
using: :btree
create_table
"lfs_objects"
,
force: :cascade
do
|
t
|
create_table
"lfs_objects"
,
force: :cascade
do
|
t
|
t
.
string
"oid"
,
null:
false
t
.
string
"oid"
,
null:
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment