Hello, in the last few days our moodle site (2.2.1.+ Build: 20120202) has experienced crashes because there were queries clogging up the system. These are the queries our "server people" reported back as the ones they had to kill:
| Query | 491 | Copying to tmp table | SELECT gi.id, COUNT(DISTINCT u.id) AS count FROM mdl_grade_items gi
| Query | 14 | Copying to tmp table | SELECT DISTINCT go.userid FROM mdl_grade_grades go JOIN m |
This last one seemed to happen when I clicked the Grade link shown in the screenshot.
Is someone able explain to me what might be going on here and what I need to do to prevent our site from crashing like this?