Fix performance on instances list in admin UI (#15282)
- Reduce duplicate queries - Remove n+1 queries - Add accounts count to detailed view - Add separate action log entry for updating existing domain blocks
This commit is contained in:
9
db/migrate/20201206004238_create_instances.rb
Normal file
9
db/migrate/20201206004238_create_instances.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class CreateInstances < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_view :instances, materialized: true
|
||||
|
||||
# To be able to refresh the view concurrently,
|
||||
# at least one unique index is required
|
||||
safety_assured { add_index :instances, :domain, unique: true }
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user