lovedigit
👽 Chevereto Freak
▶ Reproduction steps
This is very specific number. I don't think it is exactly about large database queries as we previously thought. Because 1 image shouldn't make day and night difference.
If album has less than 3,200 images, any image in the album loads fine. At exactly 3,200 images, it starts to load slow.
The album listing, user account listing, and other website operations are not affected regardless of number of images in album.
I did test it locally as well. It has the same issue.
📃 Error log message
No log, except slow mysql queries.
[CODE title="mysql slow query log"]# User@Host: chevereto[chevereto] @ localhost []
# Thread_id: 339585 Schema: chevereto QC_hit: No
# Query_time: 10.649693 Lock_time: 0.000110 Rows_sent: 6 Rows_examined: 760815
# Rows_affected: 0 Bytes_sent: 15124
SET timestamp=1621098219;
SELECT * , NULL as image_original_exifdata FROM (SELECT * FROM chv_images
LEFT JOIN chv_albums ON chv_images.image_album_id = chv_albums.album_id
WHERE chv_images.image_album_id=2 AND chv_images.image_id <= 223239 AND chv_images.image_is_approved = 1 AND image_size > 0 AND (chv_albums.album_privacy NOT IN ('private','private_but_link','password','custom') OR chv_albums.album_privacy IS NULL)
ORDER BY chv_images.image_date_gmt DESC, chv_images.image_id DESC
LIMIT 6) chv_images
LEFT JOIN chv_storages ON chv_images.image_storage_id = chv_storages.storage_id
LEFT JOIN chv_users ON chv_images.image_user_id = chv_users.user_id
LEFT JOIN chv_categories ON chv_images.image_category_id = chv_categories.category_id
ORDER BY chv_images.image_date_gmt DESC, chv_images.image_id DESC;[/CODE]
- Create an album
- Upload exactly 3,199 images (I used import tool)
- Open any image in that album. it will load at normal speed. No stress on database as well.
- Add 1 more image
- Open any image in that album. Now it takes about 5-10 seconds for first byte.
This is very specific number. I don't think it is exactly about large database queries as we previously thought. Because 1 image shouldn't make day and night difference.
If album has less than 3,200 images, any image in the album loads fine. At exactly 3,200 images, it starts to load slow.
The album listing, user account listing, and other website operations are not affected regardless of number of images in album.
I did test it locally as well. It has the same issue.
📃 Error log message
No log, except slow mysql queries.
[CODE title="mysql slow query log"]# User@Host: chevereto[chevereto] @ localhost []
# Thread_id: 339585 Schema: chevereto QC_hit: No
# Query_time: 10.649693 Lock_time: 0.000110 Rows_sent: 6 Rows_examined: 760815
# Rows_affected: 0 Bytes_sent: 15124
SET timestamp=1621098219;
SELECT * , NULL as image_original_exifdata FROM (SELECT * FROM chv_images
LEFT JOIN chv_albums ON chv_images.image_album_id = chv_albums.album_id
WHERE chv_images.image_album_id=2 AND chv_images.image_id <= 223239 AND chv_images.image_is_approved = 1 AND image_size > 0 AND (chv_albums.album_privacy NOT IN ('private','private_but_link','password','custom') OR chv_albums.album_privacy IS NULL)
ORDER BY chv_images.image_date_gmt DESC, chv_images.image_id DESC
LIMIT 6) chv_images
LEFT JOIN chv_storages ON chv_images.image_storage_id = chv_storages.storage_id
LEFT JOIN chv_users ON chv_images.image_user_id = chv_users.user_id
LEFT JOIN chv_categories ON chv_images.image_category_id = chv_categories.category_id
ORDER BY chv_images.image_date_gmt DESC, chv_images.image_id DESC;[/CODE]
Last edited: