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
bf9a9b96
Commit
bf9a9b96
authored
Mar 25, 2021
by
Kerri Miller
Committed by
Adam Hegyi
Mar 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove extra index
Remove extra index from structure.sql
parent
226ca05c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
0 deletions
+26
-0
changelogs/unreleased/325605-query-performance-investigation-4458344713234267000-select-merge_r.yml
...ance-investigation-4458344713234267000-select-merge_r.yml
+5
-0
db/migrate/20210323182846_add_project_status_date_index_to_merge_requests.rb
...182846_add_project_status_date_index_to_merge_requests.rb
+18
-0
db/schema_migrations/20210323182846
db/schema_migrations/20210323182846
+1
-0
db/structure.sql
db/structure.sql
+2
-0
No files found.
changelogs/unreleased/325605-query-performance-investigation-4458344713234267000-select-merge_r.yml
0 → 100644
View file @
bf9a9b96
---
title
:
Add additional index to merge_requests table for project/status/created_at
merge_request
:
57267
author
:
type
:
performance
db/migrate/20210323182846_add_project_status_date_index_to_merge_requests.rb
0 → 100644
View file @
bf9a9b96
# frozen_string_literal: true
class
AddProjectStatusDateIndexToMergeRequests
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
"idx_mrs_on_target_id_and_created_at_and_state_id"
disable_ddl_transaction!
def
up
add_concurrent_index
:merge_requests
,
%i[target_project_id state_id created_at id]
,
name:
INDEX_NAME
end
def
down
remove_concurrent_index_by_name
:merge_requests
,
INDEX_NAME
end
end
db/schema_migrations/20210323182846
0 → 100644
View file @
bf9a9b96
9ee014f462ec0d2affaab146243fb991298e9b30bd57b741fba0440b1676de03
\ No newline at end of file
db/structure.sql
View file @
bf9a9b96
...
...
@@ -21706,6 +21706,8 @@ CREATE UNIQUE INDEX idx_metrics_users_starred_dashboard_on_user_project_dashboar
CREATE INDEX idx_mr_cc_diff_files_on_mr_cc_id_and_sha ON merge_request_context_commit_diff_files USING btree (merge_request_context_commit_id, sha);
CREATE INDEX idx_mrs_on_target_id_and_created_at_and_state_id ON merge_requests USING btree (target_project_id, state_id, created_at, id);
CREATE UNIQUE INDEX idx_on_compliance_management_frameworks_namespace_id_name ON compliance_management_frameworks USING btree (namespace_id, name);
CREATE UNIQUE INDEX idx_on_external_approval_rules_project_id_external_url ON external_approval_rules USING btree (project_id, external_url);
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