Jake B.
Well-known member
I'm not sure if some cache didn't rebuild correctly, or what exactly is going on, but this query is running for about 5-7 seconds every time one of the pages are loaded:
Code:
SELECT COUNT(*)
FROM `xf_mg_media_item`
LEFT JOIN `xf_mg_album` AS `xf_mg_album_Album_1` ON (`xf_mg_album_Album_1`.`album_id` = `xf_mg_media_item`.`album_id`)
WHERE (IF(`xf_mg_media_item`.`album_id` > 0, `xf_mg_album_Album_1`.`album_state` = 'visible', 1=1)) AND ((`xf_mg_media_item`.`category_id` IN (500, 504, 502, 1420, 935, 513, 1418, 937, 1173, 511, 978, 939, 653, 674, 831, 705, 654, 656, 657, 670, 681, 688, 1393, 1422, 569, 839, 829, 1405, 1407, 1406, 1408, 1411, 840, 522, 534, 528, 1409, 1410, 577, 759, 1412, 1413, 1398, 938, 639, 1204, 1423, 1424)) OR (`xf_mg_media_item`.`category_id` = 0)) AND ((`xf_mg_media_item`.`media_state` IN ('visible', 'deleted')))