Moodle

Moodle1.9.3 getting slow

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Won't Fix
  • Affects Version/s: 1.9.3
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    Moodle1.9.3 (20081015). Server: Php5.2.6/MySql4.1.20
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_19_STABLE

Description

I've updated to Moodle1.9.3 (20081015). Server: Php5.2.6/MySql4.1.20
It looks OK for one user. But, when several users online, it will be very slow.
By checking the server, there is a database query being performed which is taking a long time:
eg.

  1. Query_time: 44 Lock_time: 6 Rows_sent: 1 Rows_examined: 20508510
    SELECT DISTINCT r.id, r.approved, r.timecreated, r.timemodified,
    r.userid, u.firstname, u.lastname FROM mdl_data_content
    c,mdl_data_records r,mdl_data_content cs, mdl_user u WHERE c.recordid =
    r.id
    AND r.dataid = 8
    AND r.userid = u.id
    AND cs.recordid = r.id ORDER BY
    r.timecreated DESC, r.id ASC LIMIT 107,1;

this query takes 44 seconds to complete, and examins 20 million rows.

Problem is the reference to mdl_data_content ,seems to be in the FROM line twice:
mdl_data_content c
mdl_data_content cs
seems the c refence is not being used.
removing this and changing c.recordid= r.id to cs.recordid = r.id
speeds up the query immensely ( to 0.01 seconds)
this needs to be fixed as its starting to have an impact on the database
server.
File location: moodle/mod/data/view.php

Issue Links

Activity

Hide
Wenxin Lu added a comment -

Updated on line 441 and 445

Show
Wenxin Lu added a comment - Updated on line 441 and 445
Hide
Petr Škoda (skodak) added a comment -

Eloy, did you fix this already?

Show
Petr Škoda (skodak) added a comment - Eloy, did you fix this already?
Hide
Generazion Consulting S.L. added a comment -

Hello friends,

We believe we have a problem very similar to writing here.

You linked to our problem, we expect your support.

http://tracker.moodle.org/browse/MDL-19584

Thank you very much

Show
Generazion Consulting S.L. added a comment - Hello friends, We believe we have a problem very similar to writing here. You linked to our problem, we expect your support. http://tracker.moodle.org/browse/MDL-19584 Thank you very much
Hide
Clinton Graham added a comment -

This issue was not blocked by MDL-19584 so much as MDL-19584 duplicates it. I don't see anything that would prevent this simple fix from being committed.

Show
Clinton Graham added a comment - This issue was not blocked by MDL-19584 so much as MDL-19584 duplicates it. I don't see anything that would prevent this simple fix from being committed.
Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Michael de Raadt added a comment -

I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Show
Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Dates

  • Created:
    Updated:
    Resolved: