-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* perf(db): remove rendundant block number index * perf(db): add rollup index keys * perf(db): add transaction sender/receiver indexes
- Loading branch information
Showing
4 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
...ges/db/prisma/migrations/20240909234614_remove_redundant_block_number_index/migration.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,2 @@ | ||
-- DropIndex | ||
DROP INDEX "transaction_block_number_idx"; |
5 changes: 5 additions & 0 deletions
5
packages/db/prisma/migrations/20240909234808_add_rollup_index/migration.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,5 @@ | ||
-- DropIndex | ||
DROP INDEX "transaction_category_idx"; | ||
|
||
-- CreateIndex | ||
CREATE INDEX "transaction_category_rollup_block_number_index_idx" ON "transaction"("category", "rollup", "block_number", "index"); |
11 changes: 11 additions & 0 deletions
11
packages/db/prisma/migrations/20240910000321_add_tx_sender_receiver_indexes/migration.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 @@ | ||
-- DropIndex | ||
DROP INDEX "transaction_block_timestamp_idx"; | ||
|
||
-- CreateIndex | ||
CREATE INDEX "transaction_block_timestamp_category_rollup_block_number_in_idx" ON "transaction"("block_timestamp", "category", "rollup", "block_number", "index"); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "transaction_from_id_block_number_index_idx" ON "transaction"("from_id", "block_number", "index"); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "transaction_to_id_block_number_index_idx" ON "transaction"("to_id", "block_number", "index"); |
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