CC-5932: Update is_scheduled query is too slow