Apparently we have quite some stale entity subscriptions:
MariaDB [wikidatawiki_p]> SELECT COUNT(*) FROM wb_changes_subscription WHERE cs_subscriber_id = 'cawiki' AND NOT EXISTS(SELECT 1 FROM cawiki_p.wbc_entity_usage WHERE eu_entity_id = cs_entity_id); +----------+ | COUNT(*) | +----------+ | 13765 | +----------+ 1 row in set (33.19 sec) MariaDB [wikidatawiki_p]> SELECT COUNT(*) FROM wb_changes_subscription WHERE cs_subscriber_id = 'ruwiki' AND NOT EXISTS(SELECT 1 FROM ruwiki_p.wbc_entity_usage WHERE eu_entity_id = cs_entity_id); +----------+ | COUNT(*) | +----------+ | 104520 | +----------+ 1 row in set (40.40 sec) MariaDB [wikidatawiki_p]> SELECT COUNT(*) FROM wb_changes_subscription WHERE cs_subscriber_id = 'enwiki' AND NOT EXISTS(SELECT 1 FROM enwiki_p.wbc_entity_usage WHERE eu_entity_id = cs_entity_id); +----------+ | COUNT(*) | +----------+ | 133069 | +----------+ 1 row in set (12 min 42.03 sec)
We should create a maintenance scripts which can prune these subscriptions and make sure it is run from time to time.