forked from blockscout/blockscout
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create recommended index on tx table.
- Loading branch information
1 parent
3e27da0
commit ec5583c
Showing
4 changed files
with
22 additions
and
2 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
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
17 changes: 17 additions & 0 deletions
17
apps/explorer/priv/repo/migrations/20240207100347_recommended_tx_index.exs
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,17 @@ | ||
defmodule Explorer.Repo.Local.Migrations.RecommendedTxIndex do | ||
use Ecto.Migration | ||
|
||
def change do | ||
create_if_not_exists( | ||
index( | ||
:transactions, | ||
[ | ||
:block_hash, | ||
:hash | ||
], | ||
name: "transactions_block_hash_hash", | ||
concurrently: true | ||
) | ||
) | ||
end | ||
end |