Index for block refetch_needed

v6.0.0-dev
Viktor Baranov 12 months ago
parent 6cbbe1f2ae
commit a176c38825
  1. 1
      CHANGELOG.md
  2. 15
      apps/explorer/priv/repo/migrations/20231215132609_add_index_blocks_refetch_needed.exs

@ -57,6 +57,7 @@
- [#9094](https://github.com/blockscout/blockscout/pull/9094) - Improve exchange rates logging
- [#9014](https://github.com/blockscout/blockscout/pull/9014) - Decrease amount of NFT in address collection: 15 -> 9
- [#9009](https://github.com/blockscout/blockscout/pull/9009) - Index for block refetch_needed
- [#8994](https://github.com/blockscout/blockscout/pull/8994) - Refactor transactions event preloads
<details>

@ -0,0 +1,15 @@
defmodule Explorer.Repo.Migrations.AddIndexBlocksRefetchNeeded do
use Ecto.Migration
def up do
execute("""
CREATE INDEX consensus_block_hashes_refetch_needed ON blocks((1)) WHERE consensus and refetch_needed;
""")
end
def down do
execute("""
DROP INDEX consensus_block_hashes_refetch_needed;
""")
end
end
Loading…
Cancel
Save