-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(eventindexer): add indexes for struggling queries (#15483)
- Loading branch information
1 parent
62eebe4
commit 8b81028
Showing
6 changed files
with
51 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/eventindexer/migrations/20250906208839_alter_transactions_table_add_indexes.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
ALTER TABLE `transactions` ADD INDEX transacted_at_index(`transacted_at`), | ||
ADD INDEX transacted_at_contract_address_index(`transacted_at`, `contract_address`); | ||
|
||
-- +goose StatementEnd | ||
-- +goose Down | ||
-- +goose StatementBegin | ||
DROP INDEX transacted_at_index on transactions; | ||
DROP INDEX transacted_at_contract_address_index on transactions; | ||
-- +goose StatementEnd |
15 changes: 15 additions & 0 deletions
15
packages/eventindexer/migrations/20260906208839_alter_events_table_add_indexes.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
ALTER TABLE `events` ADD INDEX `event_transacted_at_tier_index` (`transacted_at`, `event`, `tier`), | ||
ADD INDEX `event_transacted_at_index` (`transacted_at`, `event`), | ||
ADD INDEX `event_block_id_index` (`event`, `block_id`), | ||
ADD INDEX `event_tier_index` (`event`, `tier`); | ||
|
||
-- +goose StatementEnd | ||
-- +goose Down | ||
-- +goose StatementBegin | ||
DROP INDEX event_transacted_at_tier_index on events, | ||
event_transacted_at_index on events, | ||
event_block_id_index on events, | ||
event_tier_index on events; | ||
-- +goose StatementEnd |
9 changes: 9 additions & 0 deletions
9
packages/eventindexer/migrations/20270906208839_alter_accounts_table_add_indexes.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
ALTER TABLE `accounts` ADD INDEX `transacted_at_index` (`transacted_at`); | ||
|
||
-- +goose StatementEnd | ||
-- +goose Down | ||
-- +goose StatementBegin | ||
DROP INDEX transacted_at_index on accounts; | ||
-- +goose StatementEnd |
9 changes: 9 additions & 0 deletions
9
packages/eventindexer/migrations/20280906208839_alter_blocks_table_add_indexes.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
ALTER TABLE `blocks` ADD INDEX `transacted_at_index` (`transacted_at`); | ||
|
||
-- +goose StatementEnd | ||
-- +goose Down | ||
-- +goose StatementBegin | ||
DROP INDEX transacted_at_index on blocks; | ||
-- +goose StatementEnd |
8b81028
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
bridge-ui-v2-a6 – ./packages/bridge-ui-v2
bridge-ui-v2-a6.vercel.app
bridge-ui-v2-a6-git-alpha-6-taikoxyz.vercel.app
bridge-ui-v2-a6-taikoxyz.vercel.app
bridge.katla.taiko.xyz
8b81028
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
bridge-ui-v2-internal – ./packages/bridge-ui-v2
bridge-ui-v2-internal-git-alpha-6-taikoxyz.vercel.app
bridge-ui-v2-internal.vercel.app
bridge-ui-v2-internal-taikoxyz.vercel.app