-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
services/horizon: Add history_assets to lookup tables reap (#4565)
Adds the last remaining table: `history_assets` to lookup table reaper. In #4518 the code responsible for reaping lookup tables was added but was missing one table: `history_assets` due to lack of proper indexes. This commit should remove all remaining data in lookup tables.
- Loading branch information
Showing
3 changed files
with
38 additions
and
1 deletion.
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
9 changes: 9 additions & 0 deletions
9
services/horizon/internal/db2/schema/60_add_asset_id_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 @@ | ||
-- +migrate Up | ||
|
||
CREATE INDEX "htrd_by_counter_asset" ON history_trades USING btree (counter_asset_id); | ||
CREATE INDEX "htrd_agg_counter_asset" ON history_trades_60000 USING btree (counter_asset_id); | ||
|
||
-- +migrate Down | ||
|
||
DROP INDEX "htrd_by_counter_asset"; | ||
DROP INDEX "htrd_agg_counter_asset"; |