Hi Sven,
I'm terribly upset by this. You're right, the release 7 do not solve this compatibility issue.
I worked a bit on the problem. There are some heavy duty queries that make multiple count compilation like this :
SELECT
s.*,
MAX(a.studentid = {$studentid}) as appointedbyme,
MAX(a.studentid) as appointed,
COUNT(IF(a.attended IS NULL OR a.attended = 0, NULL, 1)) as attended,
COUNT(IF(a.studentid IS NULL, NULL, 1)) as population
FROM
{$CFG->prefix}scheduler_slots AS s
LEFT JOIN
{$CFG->prefix}scheduler_appointment AS a
ON
a.slotid = s.id
WHERE
s.schedulerid = {$schedulerid}
GROUP BY
s.id
HAVING
((s.exclusivity > 0 AND population < s.exclusivity) OR
s.exclusivity = 0) OR appointedbyme
ORDER BY
s.starttime ASC
There are two or three queries like this that allows counting several conditional situations over one unique table product scan.
these are mainly in locallib.php, at §213 in
function scheduler_get_available_slots($studentid, $schedulerid, $studentside=false){
...
}
The other one resides in teacherview.php §523
SELECT
s.*,
COUNT(IF(a.studentid IS NOT NULL, 1, NULL)) as isappointed,
COUNT(IF(a.attended IS NOT NULL AND a.attended > 0, 1, NULL)) as isattended
FROM
{$CFG->prefix}scheduler_slots AS s
LEFT JOIN
{$CFG->prefix}scheduler_appointment AS a
ON
s.id = a.slotid
WHERE
{$select}
GROUP BY
s.id
ORDER BY
starttime ASC
These are obviously the two key points. Maybe you would like to change these to simpler queries, splitting them for getting the actual result. I think teacherview.php's one is easy, because counts are not involved in SELECT clauses. Might be harder for the former. I still didn't have time for this by now as we are in a heavy range with end of semester overbooking.
If you don't know how to find a way, I should spend a bit time on them before end of March...