nextcloud / photos

📸 Your memories under your control
GNU Affero General Public License v3.0
517 stars 59 forks source link

Add owner, file_id index to oc_photos_albums_files #2445

Open juliushaertl opened 2 months ago

juliushaertl commented 2 months ago

There are queries that get executed regularly on share removal which do not use an index:

Screenshot 2024-04-22 at 10 23 43

https://github.com/nextcloud/photos/blob/c77b9046a17509ec166186f64e0dee934ddc3e9c/lib/Album/AlbumMapper.php#L320

Adding a combined index for owner, file_id should solve this