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
26b89a55
Commit
26b89a55
authored
Jan 26, 2022
by
Mehmet Emin INAC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add compound index for `vulnerabilities` table on `project_id` and `id`
Changelog: performance
parent
c9faf2ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
db/migrate/20220125230538_add_compound_index_on_project_id_and_id_for_vulnerabilities.rb
...ompound_index_on_project_id_and_id_for_vulnerabilities.rb
+15
-0
db/schema_migrations/20220125230538
db/schema_migrations/20220125230538
+1
-0
db/structure.sql
db/structure.sql
+2
-0
No files found.
db/migrate/20220125230538_add_compound_index_on_project_id_and_id_for_vulnerabilities.rb
0 → 100644
View file @
26b89a55
# frozen_string_literal: true
class
AddCompoundIndexOnProjectIdAndIdForVulnerabilities
<
Gitlab
::
Database
::
Migration
[
1.0
]
INDEX_NAME
=
'index_vulnerabilities_on_project_id_and_id'
disable_ddl_transaction!
def
up
add_concurrent_index
:vulnerabilities
,
[
:project_id
,
:id
],
name:
INDEX_NAME
end
def
down
remove_concurrent_index
:vulnerabilities
,
[
:project_id
,
:id
],
name:
INDEX_NAME
end
end
db/schema_migrations/20220125230538
0 → 100644
View file @
26b89a55
6f3a3712288c3316042426d60f087817eb57a3246b750831aa72f95f30269a5d
\ No newline at end of file
db/structure.sql
View file @
26b89a55
...
...
@@ -27951,6 +27951,8 @@ CREATE INDEX index_vulnerabilities_on_last_edited_by_id ON vulnerabilities USING
CREATE INDEX index_vulnerabilities_on_milestone_id ON vulnerabilities USING btree (milestone_id);
CREATE INDEX index_vulnerabilities_on_project_id_and_id ON vulnerabilities USING btree (project_id, id);
CREATE INDEX index_vulnerabilities_on_project_id_and_state_and_severity ON vulnerabilities USING btree (project_id, state, severity);
CREATE INDEX index_vulnerabilities_on_resolved_by_id ON vulnerabilities USING btree (resolved_by_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