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
9a886ecb
Commit
9a886ecb
authored
Apr 06, 2020
by
Patrick Derichs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add index to resource_milestone_events
parent
11522d2a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
changelogs/unreleased/38096-add-index-on-resource-milestone-events-created-at-pd.yml
...-add-index-on-resource-milestone-events-created-at-pd.yml
+5
-0
db/migrate/20200406135648_add_index_to_created_at_on_resource_milestone_events.rb
...8_add_index_to_created_at_on_resource_milestone_events.rb
+19
-0
db/structure.sql
db/structure.sql
+3
-0
No files found.
changelogs/unreleased/38096-add-index-on-resource-milestone-events-created-at-pd.yml
0 → 100644
View file @
9a886ecb
---
title
:
Add index for created_at of resource_milestone_events
merge_request
:
28929
author
:
type
:
performance
db/migrate/20200406135648_add_index_to_created_at_on_resource_milestone_events.rb
0 → 100644
View file @
9a886ecb
# frozen_string_literal: true
class
AddIndexToCreatedAtOnResourceMilestoneEvents
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
INDEX_NAME
=
'index_resource_milestone_events_created_at'
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:resource_milestone_events
,
:created_at
,
name:
INDEX_NAME
end
def
down
remove_concurrent_index_by_name
:resource_milestone_events
,
INDEX_NAME
end
end
db/structure.sql
View file @
9a886ecb
...
...
@@ -10036,6 +10036,8 @@ CREATE INDEX index_resource_label_events_on_merge_request_id ON public.resource_
CREATE
INDEX
index_resource_label_events_on_user_id
ON
public
.
resource_label_events
USING
btree
(
user_id
);
CREATE
INDEX
index_resource_milestone_events_created_at
ON
public
.
resource_milestone_events
USING
btree
(
created_at
);
CREATE
INDEX
index_resource_milestone_events_on_issue_id
ON
public
.
resource_milestone_events
USING
btree
(
issue_id
);
CREATE
INDEX
index_resource_milestone_events_on_merge_request_id
ON
public
.
resource_milestone_events
USING
btree
(
merge_request_id
);
...
...
@@ -13069,6 +13071,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200403184110
20200403185127
20200403185422
20200406135648
20200407094005
20200407094923
\
.
...
...
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