-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index: Improve the query performance when flagging hidden files #2928
Comments
You can suggest a different query that does the same. |
It happens after I migrated the database from DB in docker to DB in host. It has no problem for db in docker so I tried to re-import the database again and seems it works now. |
Signed-off-by: Michael Mayer <michael@photoprism.app>
I have already changed the queries. It would be great if you could test it when a new development preview is available later today! |
Any update on this? |
Sorry for the late reply. I did some test on the latest preview and there is no more slow sql query like this. |
Excellent, thank you! |
I noticed that there is a SQL query causes the CPU to 100% usage all the time, below is the information I found in db slow log:
This maybe the issue of Mariadb because it works with this query "select count(*) from photos WHERE (id NOT IN (SELECT photo_id FROM files WHERE file_primary = 1 AND file_missing = 0 AND file_error = '' AND deleted_at IS NULL))", but how could I avoid this issue in Photoprism?
Database: Mariadb 10.9.3.
Row count of table 'photos': 86789.
The text was updated successfully, but these errors were encountered: