Extract counters from accounts table to account_stats table (#9295)
This commit is contained in:
parent
4fdefffb99
commit
d6b9a62e0a
25 changed files with 203 additions and 68 deletions
|
@ -22,7 +22,7 @@ class InstancePresenter
|
|||
end
|
||||
|
||||
def status_count
|
||||
Rails.cache.fetch('local_status_count') { Account.local.sum(:statuses_count) }
|
||||
Rails.cache.fetch('local_status_count') { Account.local.joins(:account_stat).sum('account_stats.statuses_count') }
|
||||
end
|
||||
|
||||
def domain_count
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue