UserAction.ensure_consistency! too slow. Is there a way to optimize it?

discourse v2.2.4
pg 10.15

user_actions row: 200w

slow sql


explain sql

Upgrade first, that’s 27 months old, this probably has been addressed in the meanwhile.

3 Likes