Lots of message in nextcloud.log Inefficient fetching of metadata

Nextcloud version (eg, 20.0.5): 25.0.1
Operating system and version (eg, Ubuntu 20.04): Debian 11
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.25
PHP version (eg, 7.4): 7.4

The issue you are facing:
Tons of messages see subject

Is this the first time you’ve seen this error? (Y/N): Yes

The output of your Nextcloud log:

{"reqId":"xfKYsmF2qZ4mRVBe21o0","level":0,"time":"2022-11-15T09:25:39+00:00","remoteAddr":"192.168.178.21","user":"icke","app":"no app in context","method":"REPORT","url":"/remote.php/dav/files/icke/","message":"Inefficient fetching of metadata","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36","version":"25.0.1.1","data":[]}
{"reqId":"xfKYsmF2qZ4mRVBe21o0","level":0,"time":"2022-11-15T09:25:39+00:00","remoteAddr":"192.168.178.21","user":"icke","app":"no app in context","method":"REPORT","url":"/remote.php/dav/files/icke/","message":"Inefficient fetching of metadata","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36","version":"25.0.1.1","data":[]}
{"reqId":"xfKYsmF2qZ4mRVBe21o0","level":0,"time":"2022-11-15T09:25:39+00:00","remoteAddr":"192.168.178.21","user":"icke","app":"no app in context","method":"REPORT","url":"/remote.php/dav/files/icke/","message":"Inefficient fetching of metadata","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win6

Message is browser independent
No meta apps installed, only Photo App active
See this message first time

Seems to be related to Photos Apps → Tags
can anyone confirmed?

I don’t see such messages. log level 0 is debug and must not be enabled in production (only for specific troubleshooting)

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/logging_configuration.html#log-level

Of course you’re right but i set this loglevel to debug very log load time for display pics at my photo app. Sorry about this misunderstood.

My collection have around 40k pics, located at my WD NAS at home with 1G bandwith. If i try to display the results of recognize inside the photo app i must wait around 15 minutes or longer. But using this files app with pre-defined 3-digit search the result will display in around 3-5 secs. For me this is related to the code for display the search results by the photo app. But i really dont know because i am not a coder…

I’m sorry have no good hint as I don’t use photo app. In general when you hit such issues you need to analyze the system one piece after another - start reproducing the issue and check what is the limiting factor: cpu load, memory, I/O operations, DB queries etc… it is complicated but often this is the only way to isolate and finally fix the issue

It seems to me - based on watching mariadb logs - this is related to a hugh amount of db activity until the script have all related informations to display the site.