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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
db0d75ea
Commit
db0d75ea
authored
Aug 07, 2018
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant ci_builds (status) index
parent
80c47f8e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
changelogs/unreleased/ci-builds-status-index.yml
changelogs/unreleased/ci-builds-status-index.yml
+5
-0
db/migrate/20180807153545_remove_redundant_status_index_on_ci_builds.rb
...80807153545_remove_redundant_status_index_on_ci_builds.rb
+17
-0
db/schema.rb
db/schema.rb
+1
-2
No files found.
changelogs/unreleased/ci-builds-status-index.yml
0 → 100644
View file @
db0d75ea
---
title
:
Remove redundant ci_builds (status) index
merge_request
:
21070
author
:
type
:
performance
db/migrate/20180807153545_remove_redundant_status_index_on_ci_builds.rb
0 → 100644
View file @
db0d75ea
# frozen_string_literal: true
class
RemoveRedundantStatusIndexOnCiBuilds
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
remove_concurrent_index
:ci_builds
,
:status
end
def
down
add_concurrent_index
:ci_builds
,
:status
end
end
db/schema.rb
View file @
db0d75ea
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
20180
726172057
)
do
ActiveRecord
::
Schema
.
define
(
version:
20180
807153545
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -345,7 +345,6 @@ ActiveRecord::Schema.define(version: 20180726172057) do
add_index
"ci_builds"
,
[
"stage_id"
,
"stage_idx"
],
name:
"tmp_build_stage_position_index"
,
where:
"(stage_idx IS NOT NULL)"
,
using: :btree
add_index
"ci_builds"
,
[
"stage_id"
],
name:
"index_ci_builds_on_stage_id"
,
using: :btree
add_index
"ci_builds"
,
[
"status"
,
"type"
,
"runner_id"
],
name:
"index_ci_builds_on_status_and_type_and_runner_id"
,
using: :btree
add_index
"ci_builds"
,
[
"status"
],
name:
"index_ci_builds_on_status"
,
using: :btree
add_index
"ci_builds"
,
[
"token"
],
name:
"index_ci_builds_on_token"
,
unique:
true
,
using: :btree
add_index
"ci_builds"
,
[
"updated_at"
],
name:
"index_ci_builds_on_updated_at"
,
using: :btree
add_index
"ci_builds"
,
[
"user_id"
],
name:
"index_ci_builds_on_user_id"
,
using: :btree
...
...
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