the size of the files doesn’t matter for the size of the database… each file takes the same amount of space in there… it only metadata like dates, access rights etc.
now once we know the size is effectively used by the database (62gb for the table and 50GB for index). Next step would be to check if you have some extra data in this table. I would start with " select count(*) from oc_filecache"
checking if the number of the items roughly matches the number of files stored in your data directory. If yes nothing is wrong if you find big difference you have to analyze the contents of the table further… there I would look at storage column first - I remember somebody reported issues with external storage when items remain in the DB if one disconnect/remount other storages e.g. like here:
- Clean stale local storages from `oc_storages` and `oc_filecache` · Issue #43861 · nextcloud/server · GitHub
- [Bug]: occ files:cleanup is not working -- doesn't remove any of the million+ stale entries · Issue #43964 · nextcloud/server · GitHub
UPDATE: maybe little harder than my first idea oc_filecache stores previews as well which live outside of data folder
here is a small reverse engineering of the table and versions mechanics.
Another reference, maybe it provides some useful insights as well: