-
Bug
-
Resolution: Fixed
-
Major
-
1.9.19+, 2.3.2
-
MySQL
-
MOODLE_19_STABLE, MOODLE_23_STABLE
-
MOODLE_24_STABLE
-
wip-
MDL-35961-master -
Back in Moodle 1.9.x, we noticed that the list display of a database with several thousand of entries was unbearably slow (more than one minute)
We noticed that in the two main SQL queries, the table data_content was joined TWICE as below :
$tables = '
{data_content} c,{data_records} r, {data_content}cs,
{user}u ';
We fixed it by removing the second alias cs in two places ...and got back to less than one second of processing
By peeking to code of the latest Moodle 2.3.2, we noticed that the table data_content is still joined twice, which looks quite surprising ? We do not have yet huge database activities in Moodle 2.x but it seems that somebody should have a look to these queries.
I am attaching the patch I have applied to mod/data/view.php for Moodle 2.3.2
Cheers