We are running moodle 1.95 for 28 different school districts on 2 servers. The servers are fairly over spec-ed as HP DL380 G6's 2xQuad Core in each with 32GB of ram each. One for the MySQL server, and the other one is running Apache. Every once and a while we are running into a problem with the MySQL server taking a really long time to run certain queries (like 6000 seconds long). The latest one seems to be a SELECT COUNT query:
SELECT COUNT( DISTINCT c.recordid )
FROM mdl_data_content c, mdl_data_records r, mdl_data_content cs,
I know I'm missing the end of that query... the other admin that works on moodle here got angry and killed the process to free up that district. It is rather annoying though because it'll lock up a district and then eventually kills the apache server because everyone from that districts requests are waiting. Any help would be appreciated.