The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running “occ db:add-missing-indices” those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.
Missing index “fs_parent” in table “oc_filecache”.
Problem is i’m unable to run the command via bash as I’m on cpanel and there’s no sudo access.
Also tried via cron using command ‘www-data php --define apc.enable_cli=1 /var/www/nextcloud/occ db:add-missing-indices’ to no avail .
I suspect I could run some sql to fix this via phpmyadmin ,adapted this from a fix for some other issue
ALTER TABLE oc_filecache ADD INDEX fs_parent (userid, propertypath) USING BTREE;
The response is that #1072 - Key column ‘userid’ doesn’t exist in table , I suspect this SQL would likely need to be quite different anyway, bit of a stab in the dark really .
How can I best resolve this ? The instance is extremely slow currently, probably also impacting this is the following message I see -
No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the documentation .
You don’t need sudo access. If you can log into the shell as the web server user (www-data or whatever it is in your case), that would be good enough to run occ.
Thanks, sorted this now, I had the command wrong …
Still stuck on this bit -
No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the documentation .
I have the same Problem but i am on a VServer with Plesk and root access. Execute the Command with shell tells me i have the wrong php version. The server has 7.4.3 but in Plesk it is 8.x After updating from Nextcloud 26.0 to 26.1
Thanks, this is really helpful, I also raised this with my host who have now informed me that they do not allow nextcloud installs on their servers, might need to change my hosting plan …