### How to use GitHub
* Please use the 👍 [reaction](https://blog.github.com/2…016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you are affected by the same issue.
* Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
* Subscribe to receive notifications on status change and new comments.
---
## Steps to reproduce
```sql
SELECT MAX(id) FROM oc_mounts
```
## Issue description
I'm seeing what appears to be a massive amount of what I'll call churn against the `oc_mounts` table, and I think the root cause might be Nextcloud media/files shared in Talk. I've been using Talk for a while and have shared lots of media/files in chats.
This is either a bug report or performance enhancement idea.
Recently I experienced https://github.com/nextcloud/server/issues/33289 . Things improved when I upgraded to 24.0.7, but I'm still seeing lots of DML (mostly DELETEs and INSERTs) against `oc_mounts`.
I looked for slow queries by enabling the MariaDB slow query log with a threshold of 10 seconds. I have none.
I took row counts for all tables in my Nextcloud database. None are over 500k and most are much smaller.
I looked at `MAX(id)` for every table, and found that `oc_mounts` had only 7k rows, but the latest inserted rows had IDs greater than 6 million.
When I cleared all messages from a Talk chat with lots of attachments, I noticed the number of rows in `oc_mounts` decreased.
I don't have a stand-alone repro. The churn could be all due to https://github.com/nextcloud/server/issues/33289 , I don't know. I'm hoping this leads to (a) nothing, (b) a known design choice we can improve or (c) a bug we can fix.
If nextcloud/spreed isn't the correct project, maybe nextcloud/server is?
## Talk app
**Talk app version:** 14.0.6
**Custom Signaling server configured:** no
**Custom TURN server configured:** yes, (private / self-hosted coturn / seems to work OK)
**Custom STUN server configured:** yes, `stun.nextcloud.com:443`
## Server configuration
<!--
You can use the Issue Template application to prefill most of the required information: https://apps.nextcloud.com/apps/issuetemplate
-->
**Operating system**: Ubuntu 20.04 LTS 64-bit server
**Web server:** Apache
**Database:** MariaDB
**PHP version:** 8.0.25
**Nextcloud Version:** 24.0.7 (using Docker image)
**List of activated apps:**
<details>
```
- accessibility: 1.10.0
- activity: 2.16.0
- admin_audit: 1.14.0
- bruteforcesettings: 2.4.0
- calendar: 3.5.2
- circles: 24.0.1
- cloud_federation_api: 1.7.0
- comments: 1.14.0
- contacts: 4.2.2
- contactsinteraction: 1.5.0
- cookbook: 0.9.18
- dav: 1.22.0
- deck: 1.7.2
- event_update_notification: 2.0.0
- federatedfilesharing: 1.14.0
- files: 1.19.0
- files_automatedtagging: 1.14.0
- files_external: 1.16.1
- files_fulltextsearch: 24.0.1
- files_pdfviewer: 2.5.0
- files_retention: 1.13.2
- files_rightclick: 1.3.0
- files_sharing: 1.16.2
- files_trashbin: 1.14.0
- files_versions: 1.17.0
- files_videoplayer: 1.13.0
- firstrunwizard: 2.13.0
- forms: 2.5.1
- fulltextsearch: 24.0.0
- fulltextsearch_elasticsearch: 24.0.1
- impersonate: 1.11.0
- logreader: 2.9.0
- lookup_server_connector: 1.12.0
- maps: 0.2.1
- metadata: 0.17.0
- news: 19.0.0
- nextcloud_announcements: 1.13.0
- notes: 4.5.1
- notifications: 2.12.1
- oauth2: 1.12.0
- password_policy: 1.14.0
- passwords: 2022.11.21
- phonetrack: 0.7.2
- photos: 1.6.0
- polls: 3.8.3
- provisioning_api: 1.14.0
- recommendations: 1.3.0
- richdocuments: 6.3.1
- serverinfo: 1.14.0
- settings: 1.6.0
- sharebymail: 1.14.0
- spreed: 14.0.6
- support: 1.7.0
- systemtags: 1.14.0
- tasks: 0.14.5
- text: 3.5.1
- twofactor_backupcodes: 1.13.0
- twofactor_nextcloud_notification: 3.4.0
- twofactor_totp: 6.4.1
- twofactor_webauthn: 0.3.3
- updatenotification: 1.14.0
- user_status: 1.4.0
- video_converter: 1.0.5
- viewer: 1.8.0
- workflowengine: 2.6.0
```
</details>
**Nextcloud configuration:**
<details>
```json
{
"system": {
"htaccess.RewriteBase": "\/",
"htaccess.IgnoreFrontController": true,
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"nextcloud.example.com"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "24.0.7.1",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "3306",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"mail_smtpmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_sendmailmode": "smtp",
"mail_smtpport": "25",
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"forwarded_for_headers": [
"HTTP_X_FORWARDED_FOR",
"HTTP_X_REAL_IP"
],
"maintenance": false,
"loglevel": 2,
"ldapIgnoreNamingRules": false,
"ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
"has_internet_connection": true,
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"password": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"enable_previews": true,
"enabledPreviewProviders": [
"OC\\Preview\\PNG",
"OC\\Preview\\JPEG",
"OC\\Preview\\GIF",
"OC\\Preview\\BMP",
"OC\\Preview\\XBitmap",
"OC\\Preview\\MP3",
"OC\\Preview\\TXT",
"OC\\Preview\\MarkDown",
"OC\\Preview\\Movie",
"OC\\Preview\\PDF",
"OC\\Preview\\SVG"
],
"overwrite.cli.url": "https:\/\/nextcloud.example.com",
"overwriteprotocol": "https",
"app_install_overwrite": [
"cookbook",
"gpxedit"
],
"default_phone_region": "US",
"preview_max_x": "2048",
"preview_max_y": "2048",
"jpeg_quality": "60",
"theme": "",
"trashbin_retention_obligation": "auto, 30"
}
}
```
</details>
### Server log (data/nextcloud.log)
Not applicable. At least, I'm not seeing any messages that look related to this issue.