I am surprised we did not hit this cause we have a similarish setup… fixed now:
SQL is a bit gnarly but it is very fast.