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
4322a686
Commit
4322a686
authored
Nov 18, 2020
by
James Fargher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add index to project repositories
parent
d44d5964
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
db/migrate/20201117184334_add_index_to_project_repositories_shard_id_project_id.rb
..._add_index_to_project_repositories_shard_id_project_id.rb
+17
-0
db/schema_migrations/20201117184334
db/schema_migrations/20201117184334
+1
-0
db/structure.sql
db/structure.sql
+2
-0
No files found.
db/migrate/20201117184334_add_index_to_project_repositories_shard_id_project_id.rb
0 → 100644
View file @
4322a686
# frozen_string_literal: true
class
AddIndexToProjectRepositoriesShardIdProjectId
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:project_repositories
,
[
:shard_id
,
:project_id
]
end
def
down
remove_concurrent_index
:project_repositories
,
[
:shard_id
,
:project_id
],
name:
'index_project_repositories_on_shard_id_and_project_id'
end
end
db/schema_migrations/20201117184334
0 → 100644
View file @
4322a686
7988d01be5fac0f2a28cc97e309bfa16450d2e376888401fc2ad521aa0082020
\ No newline at end of file
db/structure.sql
View file @
4322a686
...
...
@@ -21769,6 +21769,8 @@ CREATE UNIQUE INDEX index_project_repositories_on_project_id ON project_reposito
CREATE
INDEX
index_project_repositories_on_shard_id
ON
project_repositories
USING
btree
(
shard_id
);
CREATE
INDEX
index_project_repositories_on_shard_id_and_project_id
ON
project_repositories
USING
btree
(
shard_id
,
project_id
);
CREATE
UNIQUE
INDEX
index_project_repository_states_on_project_id
ON
project_repository_states
USING
btree
(
project_id
);
CREATE
INDEX
index_project_repository_storage_moves_on_project_id
ON
project_repository_storage_moves
USING
btree
(
project_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