MDL-34785 performance improvement with big list of courses