CC-5932: Update is_scheduled query is too slow

Forgot to remove some debugging statements