Skip to content

Commit ca7dab1

Browse files
committed
Drop recent_account_transactions_mv
Add migration 048 to remove the unused indexer.recent_account_transactions_mv. The migration deletes any scheduled database_jobs that reference the view and drops the materialized view with CASCADE. This MV was created in migration 030, is not queried anywhere in the codebase, and its 4-hour refresh appeared as a top load query despite having no consumers.
1 parent aea65d5 commit ca7dab1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
-- Migration 048: Drop unused recent_account_transactions_mv
2+
--
3+
-- This MV was created in migration 030 to optimize account transaction searches.
4+
-- It is not queried anywhere in the codebase — confirmed by grep of all source files.
5+
-- The 4-hour refresh job scans 7 days of transactions_accounts + transactions
6+
-- and shows up as the #3 load query in Performance Insights despite zero consumers.
7+
8+
DELETE FROM indexer.database_jobs
9+
WHERE query LIKE '%recent_account_transactions_mv%';
10+
11+
DROP MATERIALIZED VIEW IF EXISTS indexer.recent_account_transactions_mv CASCADE;

0 commit comments

Comments
 (0)