Skip to content

Commit 964fd37

Browse files
committed
Drop unused task_events_v2 duration and attributes_text indexes
1 parent de50ae4 commit 964fd37

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
-- +goose Up
2+
3+
-- These indexes are not used in any WHERE clause.
4+
-- idx_duration: duration is only written/read as a column, never filtered on.
5+
-- idx_attributes_text: search queries use the task_events_search_v1 table instead.
6+
ALTER TABLE trigger_dev.task_events_v2
7+
DROP INDEX IF EXISTS idx_duration;
8+
9+
ALTER TABLE trigger_dev.task_events_v2
10+
DROP INDEX IF EXISTS idx_attributes_text;
11+
12+
-- +goose Down
13+
14+
ALTER TABLE trigger_dev.task_events_v2
15+
ADD INDEX IF NOT EXISTS idx_duration duration
16+
TYPE minmax
17+
GRANULARITY 1;
18+
19+
ALTER TABLE trigger_dev.task_events_v2
20+
ADD INDEX IF NOT EXISTS idx_attributes_text attributes_text
21+
TYPE tokenbf_v1(32768, 3, 0)
22+
GRANULARITY 8;

0 commit comments

Comments
 (0)