Skip to content

Commit

Permalink
Add temporary indexes for comparing sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
reductionista committed Sep 27, 2024
1 parent 8c89a84 commit 8762c37
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ CREATE UNIQUE INDEX idx_logs_chain_block_logindex ON evm.logs (evm_chain_id, blo
-- Previously used for WHERE evm_chain_id = $1 AND address = $2 AND event_sig = $3 ... ORDER BY block_number, created_at
DROP INDEX IF EXISTS evm.idx_evm_logs_ordered_by_block_and_created_at;
-- Useful for the current form of those queries: WHERE evm_chain_id = $1 AND address = $2 AND event_sig = $3 ... ORDER BY block_number, log_index
CREATE INDEX idx_logs_chain_address_event_block ON evm.logs (evm_chain_id, address, event_sig, block_number);
CREATE UNIQUE INDEX idx_logs_chain_address_event_block_logindex_uq ON evm.logs (evm_chain_id, address, event_sig, block_number, log_index);
CREATE INDEX idx_logs_chain_address_event_block_logindex ON evm.logs (evm_chain_id, address, event_sig, block_number, log_index);

-- Replace (block_number, evm_chain_id) primary key on evm.log_poller_blocks with new id column
Expand Down

0 comments on commit 8762c37

Please sign in to comment.