Fix: アカウント一覧、カスタム絵文字一覧画面を高速化 (#585)
* Change: アカウント一覧、カスタム絵文字一覧でCOUNTを発行しないように * Add index * Fix test
This commit is contained in:
parent
0f680a21b4
commit
0a6e68255f
6 changed files with 24 additions and 9 deletions
|
@ -0,0 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ImproveRemotePendingAccountsIndex < ActiveRecord::Migration[7.1]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
remove_index :accounts, :remote_pending, unique: false, algorithm: :concurrently
|
||||
|
||||
add_index :accounts, :id, name: 'index_remote_pending_users', unique: false, algorithm: :concurrently, where: 'domain IS NOT NULL AND remote_pending AND suspended_at IS NOT NULL'
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue