Skip to content

Commit

Permalink
scheme: add composite indices to losses table
Browse files Browse the repository at this point in the history
  • Loading branch information
RaghavSood committed Jun 11, 2024
1 parent c3d7c22 commit a22fef9
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
CREATE INDEX IF NOT EXISTS idx_losses_composite ON losses(tx_id, block_height, vout, amount, block_hash);
CREATE INDEX IF NOT EXISTS idx_losses_tx_id_block_height ON losses(tx_id, block_height);
-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin
DROP INDEX IF EXISTS idx_losses_composite;
DROP INDEX IF EXISTS idx_losses_tx_id_block_height;
-- +goose StatementEnd

0 comments on commit a22fef9

Please sign in to comment.