Skip to content

Commit

Permalink
Remove first two unused indexes (#376)
Browse files Browse the repository at this point in the history
* 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
neekolas authored May 10, 2024
1 parent ade549e commit a544937
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
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;

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);

0 comments on commit a544937

Please sign in to comment.