Skip to content

Commit

Permalink
fix(v1): add proper index for validator withdrawals query
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbitfly committed Nov 20, 2024
1 parent f2a2926 commit 5b2c0a2
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- +goose Up
-- +goose StatementBegin
SELECT 'creating idx_blocks_withdrawals_validatorindex_slot';
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_blocks_withdrawals_validatorindex_slot ON blocks_withdrawals (validatorindex, block_slot DESC);
-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin
SELECT 'dropping idx_blocks_withdrawals_validatorindex_slot';
DROP INDEX CONCURRENTLY IF EXISTS idx_blocks_withdrawals_validatorindex_slot;
-- +goose StatementEnd

0 comments on commit 5b2c0a2

Please sign in to comment.