Hi, upgrading our very large installation of OJS (523 journals, 168000 articles, 220000 users) and expecting things to take a while, but would be great to be able to speed up the process. Currently taking 66 hrs (without metrics table).
There are specifically 3 steps that take really long:
20 hrs: “[code: Installer Installer::migrateArticleMetadata]” (the 20hrs is from start of upgrade process, but this item uses most of that time)
18 hrs: "UPDATE submission_files SET file_stage=10 WHERE file_id IN (SELECT file_id FROM submission_galleys) "
7 hrs : “UPDATE submission_files SET file_stage=17 WHERE file_id IN (SELECT style_file_id FROM article_galleys_migration)”
Reducing the time it takes on any of these 3 steps would be a great help.
I can see some easy wins here just at a glance – but I don’t have an equivalently large installation handy for testing. Would you be willing to share the database?
Regards,
Alec Smecher
Public Knowledge Project Team
Would you mind opening a PR for this change? It would need to be PostgreSQL-compatible as well, but if you’re not sure how to go about that, I can give some guidance.
Thanks,
Alec Smecher
Public Knowledge Project Team
It is a little different, I’m afraid… you can see an example of the two syntaxes in dbscripts/xml/upgrade/3.0.0_update.xml:
<query driver="mysqli">UPDATE submission_files sf, articles_migration am SET sf.file_stage=7 WHERE am.editor_file_id=sf.file_id</query><!-- SUBMISSION_FILE_FAIR_COPY -->
<query driver="postgres7">UPDATE submission_files SET file_stage=7 FROM articles_migration am WHERE am.editor_file_id=submission_files.file_id</query><!-- SUBMISSION_FILE_FAIR_COPY -->
Those two are equivalent, but rewritten for the two different types of databases.
Thanks,
Alec Smecher
Public Knowledge Project Team
Hi @ronniebrito, thank you and well spotted, I’ve implemented the change on our local large installation and it’s made a big difference to the upgrade time