Slow query: Activity.delete_all_by_object_ap_id/1

id
|> Queries.by_object_id()
|> Queries.exclude_type("Delete")
|> select([u], u)
|> Repo.delete_all()
The Repo.delete_all()
takes longer than 60 seconds to execute and requires setting the database timeout to 120 seconds. It's not possible to delete a user otherwise.