Only do sync SQL where necessary
Revert again, this sucks