nextcloud / nextcloud/groupfolders
Slow queries till Nextcloud 30.0.1
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 343
- Forks
- 106
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 34
Description
Steps to reproduce
- migrate from 29.0.x to 30.0.1
- display files page
- show processes list in mariadb
Expected behaviour
No delay as previous version
Actual behaviour
The page is loading for a long time, nearly 20sec.
It seems to be caused by slow queries in mariadb (example below)
Server configuration
**Operating system: Ubuntu 22.04
**Web server: nginx
**Database: mariadb 10.6.18
**PHP version: 8.3
**Nextcloud version: 30.0.1
**Group folders version: 18.0.3
**Are you using external storage, if yes which one: no
**Are you using encryption: no
**Are you using an external user-backend, if yes which one: LDAP
Client configuration
**Browser: all (Chrome, firefox, safari...)
**Operating system: all (Mac, Windows, Linux)
Logs
example of slow query:
SELECT f.folder_id, f.mount_point, f.quota, f.acl, c.fileid, c.storage, c.path, c.name, c.mimetype, c.mimepart, c.size, c.mtime, c.storage_mtime, c.etag, c.encrypted, c.parent, a.permissions AS group_permissions, c.permissions AS permissions FROM oc_group_folders f INNER JOIN oc_group_folders_groups a ON f.folder_id = a.folder_id LEFT JOIN oc_filecache c ON (c.name = CONCAT(f.folder_id, '')) AND (c.parent = '12345') LEFT JOIN oc_circles_membership w_j ON (w_j.single_id = 'abcdefghijklmnopqrstuvwxyz12345') AND (w_j.circle_id = a.circle_id) LEFT JOIN oc_circles_circle w_j_k ON w_j.circle_id = w_j_k.unique_id WHERE w_j.level >= 1;
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the listed migration and files-page reproduction, then inspect the slow query in the MariaDB process list under the reported configuration. Compare behavior with Nextcloud 29.0.x and trace the group-folders query shown in the report. Done means the files page no longer incurs the reported nearly 20-second delay.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mariadb, nginx, php, ubuntu
- Domain
- backend, database, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100