Moodle

database view extremely slow after upgrade

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.3
  • Fix Version/s: 1.9
  • Labels:
    None
  • Environment:
    SLES 10, MySQL 5.0.26,
    SELECT COUNT(*) FROM moodle.mdl_data_content -> 25220
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

After upgrading from moodle 1.8 to 1.9.3 views like
http://vc.uni-bamberg.de/moodle/mod/data/view.php?id=67166
became very slow (like 30 secs or longer). Load on the machine was 0.3 versus 0.8 when delivering such pages

ALTER TABLE `moodle`.`mdl_data_content` ADD INDEX `fieldid`(`fieldid`);
ALTER TABLE `moodle`.`mdl_data_content` ADD INDEX `recordid`(`recordid`);

seemed to fix it

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Hi Martin,

it's really strange, because I've performed that upgrade here some minutes ago and haven't seen anything related with those indexes.

I can imagine them missing if you server comes from older versions but 1.8 => 1.9 shouldn't be a problem.

In any case, you can go to Admin->Misc->XMLDB Editor->Check Indexes and Moodle will tell you about all the missing indexes in your server. For sure it'll help.

Resolving this as fixed by the utility commented.

Thanks and ciao

Show
Eloy Lafuente (stronk7) added a comment - Hi Martin, it's really strange, because I've performed that upgrade here some minutes ago and haven't seen anything related with those indexes. I can imagine them missing if you server comes from older versions but 1.8 => 1.9 shouldn't be a problem. In any case, you can go to Admin->Misc->XMLDB Editor->Check Indexes and Moodle will tell you about all the missing indexes in your server. For sure it'll help. Resolving this as fixed by the utility commented. Thanks and ciao

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: