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
b6a5af27
Commit
b6a5af27
authored
May 18, 2021
by
Kerri Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'add_duplicate_notes_note_trigram_index' into 'master'"
This reverts merge request !61430
parent
909aa460
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
33 deletions
+1
-33
changelogs/unreleased/add_duplicate_notes_note_trigram_index.yml
...ogs/unreleased/add_duplicate_notes_note_trigram_index.yml
+0
-5
db/post_migrate/20210511051718_create_index_on_notes_note.rb
db/post_migrate/20210511051718_create_index_on_notes_note.rb
+0
-26
db/schema_migrations/20210511051718
db/schema_migrations/20210511051718
+0
-1
db/structure.sql
db/structure.sql
+1
-1
No files found.
changelogs/unreleased/add_duplicate_notes_note_trigram_index.yml
deleted
100644 → 0
View file @
909aa460
---
title
:
Add duplicated gin trigram index on notes table (note) to replace existing
merge_request
:
61430
author
:
type
:
performance
db/post_migrate/20210511051718_create_index_on_notes_note.rb
deleted
100644 → 0
View file @
909aa460
# 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
CreateIndexOnNotesNote
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DUPLICATE_INDEX_NAME
=
'index_notes_on_note_gin_trigram'
CURRENT_INDEX_NAME
=
'index_notes_on_note_trigram'
disable_ddl_transaction!
# https://gitlab.com/gitlab-org/gitlab/-/issues/218410#note_565624409
# We are having troubles with the index, and some inserts are taking a long time
# so in this migration we are recreating the index
def
up
add_concurrent_index
:notes
,
:note
,
name:
DUPLICATE_INDEX_NAME
,
using: :gin
,
opclass: :gin_trgm_ops
remove_concurrent_index_by_name
:notes
,
CURRENT_INDEX_NAME
end
def
down
add_concurrent_index
:notes
,
:note
,
name:
CURRENT_INDEX_NAME
,
using: :gin
,
opclass: :gin_trgm_ops
remove_concurrent_index_by_name
:notes
,
DUPLICATE_INDEX_NAME
end
end
db/schema_migrations/20210511051718
deleted
100644 → 0
View file @
909aa460
2d11da499f49964f37cc0a2c541cf58182416ae7b6b0e762a135b327099de1a4
\ No newline at end of file
db/structure.sql
View file @
b6a5af27
...
...
@@ -23674,7 +23674,7 @@ CREATE INDEX index_notes_on_discussion_id ON notes USING btree (discussion_id);
CREATE INDEX index_notes_on_line_code ON notes USING btree (line_code);
CREATE INDEX index_notes_on_note_
gin_
trigram ON notes USING gin (note gin_trgm_ops);
CREATE INDEX index_notes_on_note_trigram ON notes USING gin (note gin_trgm_ops);
CREATE INDEX index_notes_on_noteable_id_and_noteable_type_and_system ON notes USING btree (noteable_id, noteable_type, system);
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