Jake B.
Well-known member
- Affected version
- 2.1.12
Each page load takes around 5 seconds, most of which is spent on the following queries:
Run Time: 3.066389
Run time: 1.952527
There are ~3.6m attachments
Run Time: 3.066389
SQL:
SELECT COUNT(*)
FROM `xf_attachment`
INNER JOIN `xf_attachment_data` AS `xf_attachment_data_Data_1` ON (`xf_attachment_data_Data_1`.`data_id` = `xf_attachment`.`data_id`)
Run time: 1.952527
SQL:
SELECT `xf_attachment`.*, `xf_attachment_data_Data_1`.*
FROM `xf_attachment`
INNER JOIN `xf_attachment_data` AS `xf_attachment_data_Data_1` ON (`xf_attachment_data_Data_1`.`data_id` = `xf_attachment`.`data_id`)
ORDER BY `xf_attachment`.`attach_date` DESC
LIMIT 20 OFFSET 20
There are ~3.6m attachments