-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These indices are huge and not getting used by the query planner.
- Loading branch information
1 parent
0a267aa
commit 7db05e5
Showing
2 changed files
with
19 additions
and
22 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
api/db/migrate/20241206175512_remove_unused_text_section_node_indices.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
class RemoveUnusedTextSectionNodeIndices < ActiveRecord::Migration[6.1] | ||
def up | ||
execute <<~SQL | ||
DROP INDEX IF EXISTS index_text_section_nodes_pairing; | ||
DROP INDEX IF EXISTS index_text_section_nodes_on_node_path; | ||
DROP INDEX IF EXISTS index_text_section_nodes_by_id_and_hash; | ||
SQL | ||
end | ||
|
||
def down | ||
# Intentionally left blank. We won't add these indices back. | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters