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
0e7af75b
Commit
0e7af75b
authored
Nov 06, 2020
by
Pavel Shutsin
Committed by
Adam Hegyi
Dec 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant index
This index was substituted with (project_id, status, created_at) index
parent
7e60aa18
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
2 deletions
+23
-2
changelogs/unreleased/31528-index-cleanup.yml
changelogs/unreleased/31528-index-cleanup.yml
+5
-0
db/migrate/20201106135608_remove_redundant_pipelines_index.rb
...igrate/20201106135608_remove_redundant_pipelines_index.rb
+17
-0
db/schema_migrations/20201106135608
db/schema_migrations/20201106135608
+1
-0
db/structure.sql
db/structure.sql
+0
-2
No files found.
changelogs/unreleased/31528-index-cleanup.yml
0 → 100644
View file @
0e7af75b
---
title
:
Remove redundant index
merge_request
:
47072
author
:
type
:
performance
db/migrate/20201106135608_remove_redundant_pipelines_index.rb
0 → 100644
View file @
0e7af75b
# frozen_string_literal: true
class
RemoveRedundantPipelinesIndex
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
remove_concurrent_index_by_name
:ci_pipelines
,
:index_ci_pipelines_on_project_id_and_created_at
end
def
down
add_concurrent_index
:ci_pipelines
,
[
:project_id
,
:created_at
]
end
end
db/schema_migrations/20201106135608
0 → 100644
View file @
0e7af75b
52c8fb75035a08e212db52d032638a0c8f9d91306bfb8015fb3fc403a1cff1ec
\ No newline at end of file
db/structure.sql
View file @
0e7af75b
...
...
@@ -20874,8 +20874,6 @@ CREATE INDEX index_ci_pipelines_on_merge_request_id ON ci_pipelines USING btree
CREATE
INDEX
index_ci_pipelines_on_pipeline_schedule_id
ON
ci_pipelines
USING
btree
(
pipeline_schedule_id
);
CREATE
INDEX
index_ci_pipelines_on_project_id_and_created_at
ON
ci_pipelines
USING
btree
(
project_id
,
created_at
);
CREATE
INDEX
index_ci_pipelines_on_project_id_and_id_desc
ON
ci_pipelines
USING
btree
(
project_id
,
id
DESC
);
CREATE
UNIQUE
INDEX
index_ci_pipelines_on_project_id_and_iid
ON
ci_pipelines
USING
btree
(
project_id
,
iid
)
WHERE
(
iid
IS
NOT
NULL
);
...
...
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