Skip to content

Commit ab6231d

Browse files
authored
chore: create base_token_ratios_ratio_timestamp_idx index (#3411)
## What ❔ This PR adds a migration that creates an index on `ratio_timestamp` field of `base_token_ratios` table. ## Why ❔ Queries to this table are currently much heavier than they should be, that has to be optimized. ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`.
1 parent f09087b commit ab6231d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROP INDEX IF EXISTS base_token_ratios_ratio_timestamp_idx;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CREATE INDEX IF NOT EXISTS base_token_ratios_ratio_timestamp_idx ON base_token_ratios (ratio_timestamp);

0 commit comments

Comments
 (0)