Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade takes too long #274

Open
ewout opened this issue Feb 10, 2020 · 3 comments
Open

Upgrade takes too long #274

ewout opened this issue Feb 10, 2020 · 3 comments

Comments

@ewout
Copy link

ewout commented Feb 10, 2020

I use version 3.7.4 and mariadb. I encountered again a problem with the upgrade from M3.6 to M3.7. There are many queries of type

SELECT * FROM mdl_questionnaire_response_rank WHERE question_id = '229924'

which individually don't take too much time (maybe 0.1 or 0.2 seconds?), but we have 992876 entries in that table (is that a lot?). A 10^5 seconds is too long...

It has been a couple of hours now and no sign of terminating.

@danmarsden
Copy link
Contributor

Looking at that block of code I wonder if replacing it with a sql command like this might be better:

update mdl_questionnaire_question_type SET typeid = id where typeid = 0

@danmarsden
Copy link
Contributor

(But - I haven't looked closely at the code... so at your own risk etc...)

@ewout
Copy link
Author

ewout commented Feb 11, 2020

The upgrade finished, it took 168 min. I upgraded another site (with version3.7.3, but the rate.php code hasn't really changed in 3.7.4) without problems, but that site had only 36000 rows in mdl_questionnaire_response_rank, a factor 20 less.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants