You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that when I open the main dashboard it takes 4-5 seconds to get the latest files. I got SQL query for this, and figured out that it takes 3,7 seconds. The longest operation is "Creating sort index".
The generated SQL:
SELECT 'file'.'fileid', 'storage', 'path', 'path_hash', 'file'.'parent', 'name', 'mimetype', 'mimepart', 'size', 'mtime', 'storage_mtime', 'encrypted', 'etag', 'permissions', 'checksum', 'metadata_etag', 'creation_time', 'upload_time', 'unencrypted_size'
FROM 'oc_filecache' 'file'
LEFT JOIN 'oc_filecache_extended' 'fe' ON 'file'.'fileid' = 'fe'.'fileid'
WHERE (('mimetype' <> 2) OR ('size' = 0)) AND (('storage' = 2) AND (('path' = 'files') OR ('path' LIKE 'files/%')))
ORDER BY 'mtime' + '0' DESC
LIMIT 7
The problem is on ORDER BY 'mtime' + '0' DESC, without + '0' it works really fast (0,002 sec). It seems that with this zero the index is not taken into account
Steps to reproduce
Have a oc_filecache table with a size about 230 megabytes
Open dashboard page
Check how long a request to /index.php/apps/recommendations/api/recommendations/always is running
Expected behavior
query should not run for 4 seconds
Installation method
Community Docker image
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.0
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
No response
Are you using the Nextcloud Server Encryption module?
Bug description
I've noticed that when I open the main dashboard it takes 4-5 seconds to get the latest files. I got SQL query for this, and figured out that it takes 3,7 seconds. The longest operation is "Creating sort index".
The generated SQL:
The problem is on
ORDER BY 'mtime' + '0' DESC
, without+ '0'
it works really fast (0,002 sec). It seems that with this zero the index is not taken into accountSteps to reproduce
oc_filecache
table with a size about 230 megabytes/index.php/apps/recommendations/api/recommendations/always
is runningExpected behavior
query should not run for 4 seconds
Installation method
Community Docker image
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.0
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
No response
Are you using the Nextcloud Server Encryption module?
No response
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: