-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove first two unused indexes (#376)
* Remove first two unused indexes * Don't make it concurrent * Just use select 1 for down * Drop sort index too * Update PR * Rename migration * Remove if not exists * Fix splitting
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
pkg/migrations/messages/20240419172419_remove-unused-indexes.down.sql
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,5 @@ | ||
SET statement_timeout = 0; | ||
|
||
--bun:split | ||
DROP INDEX CONCURRENTLY message_receivertimestamp_idx; | ||
|
16 changes: 16 additions & 0 deletions
16
pkg/migrations/messages/20240419172419_remove-unused-indexes.up.sql
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,16 @@ | ||
SET statement_timeout = 0; | ||
|
||
--bun:split | ||
DROP INDEX IF EXISTS message_pubsubtopic_idx; | ||
|
||
--bun:split | ||
DROP INDEX IF EXISTS message_sort_idx; | ||
|
||
--bun:split | ||
DROP INDEX IF EXISTS message_recvts_shouldexpire_idx; | ||
|
||
--bun:split | ||
-- Replace recvts_shouldexpire_idx with an index just on receiver timestamp | ||
-- This index is used in our data pipelines to power the data warehouse for high level analytics on network growth | ||
CREATE INDEX CONCURRENTLY IF NOT EXISTS message_receivertimestamp_idx ON public.message(receiverTimestamp); | ||
|