Performance fix: index on blocks [miner_hash, number]

pull/3114/head
Victor Baranov 5 years ago
parent e0c99a5e6b
commit 5eeeb6dcab
  1. 1
      CHANGELOG.md
  2. 7
      apps/explorer/priv/repo/migrations/20200518075748_create_index_blocks_miner_hash_number_index.exs

@ -3,6 +3,7 @@
### Features ### Features
### Fixes ### Fixes
- [#3114](https://github.com/poanetwork/blockscout/pull/3114) - Fix performance of "Blocks validated" page
### Chore ### Chore

@ -0,0 +1,7 @@
defmodule Explorer.Repo.Migrations.CreateIndexBlocksMinerHashNumberIndex do
use Ecto.Migration
def change do
create_if_not_exists(index(:blocks, [:miner_hash, :number]))
end
end
Loading…
Cancel
Save