|
To add to the picture, Yu
Hi, Yu.
I am sorry, I can not precisely translate your question. mod/forum:initialsubscriptions allowed for teachers, non-editing teacher, students. I'm login as "administrator". This role by default on my system have moodle/site:doanything privilegies, but don't have mod/forum:initialsubscriptions. I seem have understood in what a problem. But even if you appoint in system context in a role for which initialsubscriptions it is forbidden, unsubscribe from this role all the same lasts 180 seconds.
Still well to make any prevention, on similarity of a badge in the list of roles or messages, after the termination of the long addition reminding why it has occured. unsubcribe SHOW PROCESSLIST: In my case, the slow queries happen when I, as administrator, try to remove a user from a Global Role. The global rule is a custom one we created for instructional support staff.
For that role, mod/forum:initialsubscriptions is set to "Not Set." Hi,
If mod/forum:initialsubscriptions is set to "Not Set", assigning a user to a global role should be fast. However removing a user from global role could be slow, because the code recursively tries to unsubscribe users from all courses (if the user no longer has capability to view forum posts). We have made some improvements in 1.9 and are still working on this. Most likely this query is not the culprit. Cheers, Yu Hi, Yu!
I understand, that there can be some difficulties, however optimization is necessary: yesterday the request of removal of several users of a rate from a system context was carried out more than three hours and at this time the server worked very slowly. Possibly, request contain noindexes merges which demand direct search of millions values. By the way, according to mysql, Handler_read_rnd_next = 3,591.76M and Handler_read_rnd= 23M, Created_tmp_disk_tables=444k (at tmp table size=800M!!!) that confirms my words. Hi, Yu!
Yes of course. I can provide sql-dump. Which tables you interest (full backup borrows 1.3Gb)? Hi All!
I have found the decision. I have found the request, like is: The first parte of this request working very slowest, becouse index on column mdl_role_capabilities.permission is epsent. Second part of this request working very slowest and devours memory, becouse fo wrong merge: Both these corrections together accelerate performance of inquiry about three orders (in 1000 times). What for each time to check the rights in all contexts?
Carrying unsubscribe of users, etc. the Moodle starts a series of request "SELECT rc.capability, c1.id". I think this should be fixed by the new code in HEAD ... Alex can you check and re-open if it's still bad?
We have updated moodle. Really, all works very quickly. Thanks, Martin and Yu!
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
153.448825 secs
Included 146 files
Load average: 2.31
Record cache hit/miss ratio : 16317/2323
That query hangs up mysql, writing temporary tables...