Counter updates are long queries that bog down the database
The chase for database performance issues continues.
Our current approach for counters is to issue a plain count(*)
on each table and wait for it to complete. This in turn does a full table scan. This takes a few hours on the very long content
and directory
tables, which degrades performance of the database while the count is performed.
We should be able to change those queries to perform index only scans on smaller buckets of objects without loss of generality.
Migrated from T962 (view on Phabricator)