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
d9c4fdc6
Commit
d9c4fdc6
authored
Apr 06, 2020
by
Patrick Derichs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add index on resource_weight_events for created_at
parent
8ffb3de5
Changes
3
Show 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-weight-events-created-at-pd.yml
...096-add-index-on-resource-weight-events-created-at-pd.yml
+5
-0
db/migrate/20200406141452_add_index_to_issue_id_and_created_at_on_resource_weight_events.rb
...x_to_issue_id_and_created_at_on_resource_weight_events.rb
+19
-0
db/structure.sql
db/structure.sql
+3
-0
No files found.
changelogs/unreleased/38096-add-index-on-resource-weight-events-created-at-pd.yml
0 → 100644
View file @
d9c4fdc6
---
title
:
Add index to issue_id and created_at of resource_weight_events
merge_request
:
28930
author
:
type
:
other
db/migrate/20200406141452_add_index_to_issue_id_and_created_at_on_resource_weight_events.rb
0 → 100644
View file @
d9c4fdc6
# frozen_string_literal: true
class
AddIndexToIssueIdAndCreatedAtOnResourceWeightEvents
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
INDEX_NAME
=
'index_resource_weight_events_on_issue_id_and_created_at'
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:resource_weight_events
,
[
:issue_id
,
:created_at
],
name:
INDEX_NAME
end
def
down
remove_concurrent_index_by_name
:resource_weight_events
,
INDEX_NAME
end
end
db/structure.sql
View file @
d9c4fdc6
...
...
@@ -10160,6 +10160,8 @@ CREATE INDEX index_resource_milestone_events_on_milestone_id ON public.resource_
CREATE
INDEX
index_resource_milestone_events_on_user_id
ON
public
.
resource_milestone_events
USING
btree
(
user_id
);
CREATE
INDEX
index_resource_weight_events_on_issue_id_and_created_at
ON
public
.
resource_weight_events
USING
btree
(
issue_id
,
created_at
);
CREATE
INDEX
index_resource_weight_events_on_issue_id_and_weight
ON
public
.
resource_weight_events
USING
btree
(
issue_id
,
weight
);
CREATE
INDEX
index_resource_weight_events_on_user_id
ON
public
.
resource_weight_events
USING
btree
(
user_id
);
...
...
@@ -13232,6 +13234,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200406102111
20200406102120
20200406135648
20200406141452
20200406192059
20200406193427
20200407094005
...
...
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