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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
378e39e6
Commit
378e39e6
authored
Aug 29, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
80c5e53a
87aa5e7a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
1 deletion
+41
-1
changelogs/unreleased/cluster_deployments.yml
changelogs/unreleased/cluster_deployments.yml
+5
-0
db/migrate/20190819131155_add_cluster_status_index_to_deployments.rb
...20190819131155_add_cluster_status_index_to_deployments.rb
+17
-0
db/migrate/20190826090628_remove_redundant_deployments_index.rb
...rate/20190826090628_remove_redundant_deployments_index.rb
+18
-0
db/schema.rb
db/schema.rb
+1
-1
No files found.
changelogs/unreleased/cluster_deployments.yml
0 → 100644
View file @
378e39e6
---
title
:
Add index to improve group cluster deployments query performance
merge_request
:
31988
author
:
type
:
other
db/migrate/20190819131155_add_cluster_status_index_to_deployments.rb
0 → 100644
View file @
378e39e6
# frozen_string_literal: true
class
AddClusterStatusIndexToDeployments
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:deployments
,
[
:cluster_id
,
:status
]
end
def
down
remove_concurrent_index
:deployments
,
[
:cluster_id
,
:status
]
end
end
db/migrate/20190826090628_remove_redundant_deployments_index.rb
0 → 100644
View file @
378e39e6
# frozen_string_literal: true
class
RemoveRedundantDeploymentsIndex
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
disable_ddl_transaction!
def
up
remove_concurrent_index
:deployments
,
:cluster_id
end
def
down
add_concurrent_index
:deployments
,
:cluster_id
end
end
db/schema.rb
View file @
378e39e6
...
...
@@ -1146,7 +1146,7 @@ ActiveRecord::Schema.define(version: 2019_08_28_083843) do
t
.
integer
"status"
,
limit:
2
,
null:
false
t
.
datetime_with_timezone
"finished_at"
t
.
integer
"cluster_id"
t
.
index
[
"cluster_id"
],
name:
"index_deployments_on_cluster_id
"
t
.
index
[
"cluster_id"
,
"status"
],
name:
"index_deployments_on_cluster_id_and_status
"
t
.
index
[
"created_at"
],
name:
"index_deployments_on_created_at"
t
.
index
[
"deployable_type"
,
"deployable_id"
],
name:
"index_deployments_on_deployable_type_and_deployable_id"
t
.
index
[
"environment_id"
,
"id"
],
name:
"index_deployments_on_environment_id_and_id"
...
...
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