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
53d0a632
Commit
53d0a632
authored
Jun 01, 2021
by
Pedro Pombeiro
Committed by
Adam Hegyi
Jun 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add indices for created_at+id and contacted_at+id on ci_runners
Changelog: changed
parent
66a453a5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
1 deletion
+50
-1
db/migrate/20210601125410_add_runners_created_at_index.rb
db/migrate/20210601125410_add_runners_created_at_index.rb
+20
-0
db/migrate/20210601133459_replace_runners_contacted_at_index.rb
...rate/20210601133459_replace_runners_contacted_at_index.rb
+25
-0
db/schema_migrations/20210601125410
db/schema_migrations/20210601125410
+1
-0
db/schema_migrations/20210601133459
db/schema_migrations/20210601133459
+1
-0
db/structure.sql
db/structure.sql
+3
-1
No files found.
db/migrate/20210601125410_add_runners_created_at_index.rb
0 → 100644
View file @
53d0a632
# frozen_string_literal: true
# See https://docs.gitlab.com/ee/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
AddRunnersCreatedAtIndex
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
disable_ddl_transaction!
INDEX_NAME
=
'index_ci_runners_on_created_at_and_id'
def
up
add_concurrent_index
:ci_runners
,
[
:created_at
,
:id
],
name:
INDEX_NAME
end
def
down
remove_concurrent_index
:ci_runners
,
[
:created_at
,
:id
],
name:
INDEX_NAME
end
end
db/migrate/20210601133459_replace_runners_contacted_at_index.rb
0 → 100644
View file @
53d0a632
# frozen_string_literal: true
# See https://docs.gitlab.com/ee/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
ReplaceRunnersContactedAtIndex
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
disable_ddl_transaction!
OLD_INDEX_NAME
=
'index_ci_runners_on_contacted_at'
NEW_INDEX_NAME
=
'index_ci_runners_on_contacted_at_and_id'
def
up
add_concurrent_index
:ci_runners
,
[
:contacted_at
,
:id
],
name:
NEW_INDEX_NAME
,
using:
'btree'
remove_concurrent_index_by_name
:ci_runners
,
OLD_INDEX_NAME
end
def
down
remove_concurrent_index_by_name
:ci_runners
,
NEW_INDEX_NAME
add_concurrent_index
:ci_runners
,
:contacted_at
,
name:
OLD_INDEX_NAME
,
using:
'btree'
end
end
db/schema_migrations/20210601125410
0 → 100644
View file @
53d0a632
fc500e4dd555a6baad91ad3c9fb8a2f8541e1613dd64afdbdd28b19447a28caf
\ No newline at end of file
db/schema_migrations/20210601133459
0 → 100644
View file @
53d0a632
4dcf6277439e8abe52534540100fa621fedcecb3eaf71ad5685ac0230cd2e5bb
\ No newline at end of file
db/structure.sql
View file @
53d0a632
...
@@ -22904,7 +22904,9 @@ CREATE INDEX index_ci_runner_projects_on_project_id ON ci_runner_projects USING
...
@@ -22904,7 +22904,9 @@ CREATE INDEX index_ci_runner_projects_on_project_id ON ci_runner_projects USING
CREATE INDEX index_ci_runner_projects_on_runner_id ON ci_runner_projects USING btree (runner_id);
CREATE INDEX index_ci_runner_projects_on_runner_id ON ci_runner_projects USING btree (runner_id);
CREATE INDEX index_ci_runners_on_contacted_at ON ci_runners USING btree (contacted_at);
CREATE INDEX index_ci_runners_on_contacted_at_and_id ON ci_runners USING btree (contacted_at, id);
CREATE INDEX index_ci_runners_on_created_at_and_id ON ci_runners USING btree (created_at, id);
CREATE INDEX index_ci_runners_on_description_trigram ON ci_runners USING gin (description gin_trgm_ops);
CREATE INDEX index_ci_runners_on_description_trigram ON ci_runners USING gin (description gin_trgm_ops);
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