Skip to content

Commit

Permalink
Merge pull request #333 from oasisprotocol/mitjat/db-index-events
Browse files Browse the repository at this point in the history
db: runtime_events table: add indexes
  • Loading branch information
mitjat authored Feb 27, 2023
2 parents 2094d4d + a1f880b commit 30b5669
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions storage/migrations/02_oasis_3_runtimes.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ CREATE TABLE oasis_3.runtime_events
evm_log_params JSONB,
related_accounts TEXT[]
);
CREATE INDEX ix_runtime_events_round ON oasis_3.runtime_events(runtime, round); -- for sorting by round, when there are no filters applied
CREATE INDEX ix_runtime_events_tx_hash ON oasis_3.runtime_events(tx_hash);
CREATE INDEX ix_runtime_events_related_accounts ON oasis_3.runtime_events USING gin(related_accounts);
CREATE INDEX ix_runtime_events_evm_log_signature ON oasis_3.runtime_events(evm_log_signature);
CREATE INDEX ix_runtime_events_evm_log_params ON oasis_3.runtime_events USING gin(evm_log_params);
Expand Down

0 comments on commit 30b5669

Please sign in to comment.