mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
perf: add index on labels columns to library_item table
This commit is contained in:
parent
32097de62f
commit
706277085a
2 changed files with 14 additions and 0 deletions
5
packages/db/migrations/0186.do.labels_index_on_library_item.sql
Executable file
5
packages/db/migrations/0186.do.labels_index_on_library_item.sql
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
-- Type: DO
|
||||
-- Name: labels_index_on_library_item
|
||||
-- Description: Add index on labels columns to library_item tables for better performance
|
||||
|
||||
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_library_item_state_label_names ON omnivore.library_item USING GIN (lower(array_cat(label_names, highlight_labels)::text));
|
||||
9
packages/db/migrations/0186.undo.labels_index_on_library_item.sql
Executable file
9
packages/db/migrations/0186.undo.labels_index_on_library_item.sql
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
-- Type: UNDO
|
||||
-- Name: more_index_on_library_item
|
||||
-- Description: Add index on labels columns to library_item tables for better performance
|
||||
|
||||
BEGIN;
|
||||
|
||||
DROP INDEX IF EXISTS idx_library_item_state_label_names;
|
||||
|
||||
COMMIT;
|
||||
Loading…
Reference in a new issue