⚠️ This issue respects the following points: ⚠️
Bug description
I upgraded my instance from 32 to 33 and it became very slow, showing high cpu usage for the database
Note: I run db:add-missing-indices and db:add-missing-primary-keys after the upgrade
Steps to reproduce
- enable slow_query_log, the slow query is "
DELETE FROM oc_filecacheWHEREpath_hash ="
- check index on oc_filecache, there is an index called fs_storage_path_hash, but it is build using storage+path_hash
Expected behavior
My guess is, that the index is not used because the index is build for storage+path_hash, but the query is only using path_hash
As a workaround I have added a new index "create index fs_path_hash on oc_filecache(path_hash);"
But it could also be a bug in building the query if storage should be in the where-clause...?
Nextcloud Server version
33
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.4
Web server
None
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 31 to 32)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
Bug description
I upgraded my instance from 32 to 33 and it became very slow, showing high cpu usage for the database
Note: I run db:add-missing-indices and db:add-missing-primary-keys after the upgrade
Steps to reproduce
DELETE FROMoc_filecacheWHEREpath_hash="Expected behavior
My guess is, that the index is not used because the index is build for storage+path_hash, but the query is only using path_hash
As a workaround I have added a new index "
create index fs_path_hash on oc_filecache(path_hash);"But it could also be a bug in building the query if storage should be in the where-clause...?
Nextcloud Server version
33
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.4
Web server
None
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 31 to 32)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response