You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Add users from group synch.
$newgroupmemberssql = ' FROM {via} v
LEFT JOIN {groupings_groups} gg ON v.groupingid = gg.groupingid
LEFT JOIN {groups_members} gm ON gm.groupid = gg.groupid
LEFT JOIN {via_participants} vp ON vp.activityid = v.id AND vp.userid = gm.userid ';
$newgroupmemberswhere = ' WHERE v.groupingid != 0 AND vp.id is null ';
$newgroupmembers = $DB->get_recordset_sql('select distinct v.id as activityid, v.course, v.noparticipants, gm.userid
'.$newgroupmemberssql.' '.$newgroupmemberswhere);
doesn't finish when executed on big tables. In our case via_participants has around ~630000 records and groups_members has around ~130000 records. If LIMIT 1 is used the query finish instantaneously however increasing LIMIT increases execution time.
Let me know if you need any more info.
The text was updated successfully, but these errors were encountered:
We have added a new version : 2016042006. We hope that it will fix your issue. Our moodles are smaller and we have never had this issue. Please let us know if it fixes this bug.
Thank you for your patience...
This query:
doesn't finish when executed on big tables. In our case via_participants has around ~630000 records and groups_members has around ~130000 records. If LIMIT 1 is used the query finish instantaneously however increasing LIMIT increases execution time.
Let me know if you need any more info.
The text was updated successfully, but these errors were encountered: