Project

General

Profile

Actions

Bug #688

closed

Reports tab unusable with large number of reports

Added by Kal McFate about 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

Also available in: Atom PDF