perf: speed up worlds list query (#10556)

vb-nft-collection-trigger-metadata-refetch-admin-api-endpoint
Kirill Fedoseev 4 months ago committed by GitHub
parent 343b159c77
commit 259a143c4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      apps/explorer/lib/explorer/chain/mud.ex

@ -69,8 +69,9 @@ defmodule Explorer.Chain.Mud do
paging_options = Keyword.get(options, :paging_options, Chain.default_paging_options())
Mud
|> select([r], r.address)
|> distinct(true)
|> select([r], r.address)
|> where([r], r.table_id == ^@store_tables_table_id)
|> page_worlds(paging_options)
|> limit(^paging_options.page_size)
|> Repo.Mud.all()

Loading…
Cancel
Save