Actions
Bug #688
closedReports tab unusable with large number of reports
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Description
On the reports tab the table query takes a very long time to sort (approx 3 minutes for me)
SELECT * FROM `reports` WHERE (status != 0) ORDER BY reports.created_at DESC LIMIT 0, 20
Should have a composite index on status and created_at or similar.
explain results:
+----+-------------+---------+-------+-------------------------+-------------------------+---------+------+--------+-----------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+---------+-------+-------------------------+-------------------------+---------+------+--------+-----------------------------+ | 1 | SIMPLE | reports | range | index_reports_on_status | index_reports_on_status | 5 | NULL | 516521 | Using where; Using filesort | +----+-------------+---------+-------+-------------------------+-------------------------+---------+------+--------+-----------------------------+
Actions