Skip to content

Commit

Permalink
feat(eventindexer): add indexes to querying optimizations (#13951)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey authored and dantaik committed Jun 12, 2023
1 parent 2ce05cf commit c99dc8a
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- +goose Up
-- +goose StatementBegin
ALTER TABLE `events` ADD INDEX `address_index` (`address`);

-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP INDEX address_index on events;
-- +goose StatementEnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- +goose Up
-- +goose StatementBegin
ALTER TABLE `events` ADD INDEX `event_index` (`event`);

-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP INDEX event_index on events;
-- +goose StatementEnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- +goose Up
-- +goose StatementBegin
ALTER TABLE `events` ADD INDEX `block_id_index` (`block_id`);

-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP INDEX block_id_index on events;
-- +goose StatementEnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- +goose Up
-- +goose StatementBegin
ALTER TABLE `events` ADD INDEX `address_and_event_index` (`address`, `event`);

-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP INDEX address_and_event_index on events;
-- +goose StatementEnd

0 comments on commit c99dc8a

Please sign in to comment.