+----+--------------------+----------------------+--------+------------------------------------------------------------------ -+-------------+---------+--------------------------------+------+----------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+--------------------+----------------------+--------+------------------------------------------------------------------ -+-------------+---------+--------------------------------+------+----------------------------------------------+ | 1 | PRIMARY | | ALL | NULL | NULL | NULL | NULL | 8 | Using temporary; Using filesort | | 1 | PRIMARY | Bug | eq_ref | PRIMARY,BugId,BugInfo | PRIMARY | 4 | temp.BugId | 1 | Using index | | 1 | PRIMARY | BugAgent | ref | BugId,AgentId,BugAgentRole | BugId | 4 | isupport.Bug.BugId | 1 | Using where | | 1 | PRIMARY | Agent | eq_ref | PRIMARY,AgentId | PRIMARY | 4 | isupport.BugAgent.AgentId | 1 | Using index | | 1 | PRIMARY | | ALL | NULL | NULL | NULL | NULL | 122 | | | 1 | PRIMARY | | ALL | NULL | NULL | NULL | NULL | 253 | | | 7 | DERIVED | BugStatus | index | PRIMARY,BugStatusId | PRIMARY | 4 | NULL | 8 | Using where; Using index; Using temporary | | 7 | DERIVED | Bug | ref | PRIMARY,BugId,CustomerId,BugStatusId,BugTypeId,PriorityId,BugInfo | BugStatusId | 4 | isupport.BugStatus.BugStatusId | 379 | Using where | | 7 | DERIVED | BugType | eq_ref | PRIMARY,BugTypeId | PRIMARY | 4 | isupport.Bug.BugTypeId | 1 | Using index | | 7 | DERIVED | Customer | eq_ref | PRIMARY,CustomerId | PRIMARY | 4 | isupport.Bug.CustomerId | 1 | Using index | | 7 | DERIVED | Priority | eq_ref | PRIMARY,PriorityId | PRIMARY | 4 | isupport.Bug.PriorityId | 1 | Using index | | 7 | DERIVED | BugAgent | ref | BugId,AgentId,AgentRoleId,BugAgentRole | BugId | 4 | isupport.Bug.BugId | 1 | Using where; Distinct | | 7 | DERIVED | BugRev | ref | BugId | BugId | 4 | isupport.BugAgent.BugId | 1 | Distinct | | 7 | DERIVED | Revision | eq_ref | PRIMARY,RevisionId | PRIMARY | 4 | isupport.BugRev.RevisionId | 1 | Using index; Distinct | | 7 | DERIVED | Agent | eq_ref | PRIMARY,AgentId | PRIMARY | 4 | isupport.BugAgent.AgentId | 1 | Distinct | | 8 | DEPENDENT SUBQUERY | AgentCustomBugStatus | ref | AgentId,BugStatusId,Active | AgentId | 4 | | 5 | Using where | | 5 | DERIVED | BugStatus | index | PRIMARY,BugStatusId | PRIMARY | 4 | NULL | 8 | Using where; Using index; Using temporary | | 5 | DERIVED | Bug | ref | PRIMARY,BugId,CustomerId,BugStatusId,BugTypeId,PriorityId,BugInfo | BugStatusId | 4 | isupport.BugStatus.BugStatusId | 379 | Using where | | 5 | DERIVED | BugType | eq_ref | PRIMARY,BugTypeId | PRIMARY | 4 | isupport.Bug.BugTypeId | 1 | Using index | | 5 | DERIVED | Customer | eq_ref | PRIMARY,CustomerId | PRIMARY | 4 | isupport.Bug.CustomerId | 1 | Using index | | 5 | DERIVED | Priority | eq_ref | PRIMARY,PriorityId | PRIMARY | 4 | isupport.Bug.PriorityId | 1 | Using index | | 5 | DERIVED | BugAgent | ref | BugId,AgentId,AgentRoleId,BugAgentRole | BugId | 4 | isupport.Bug.BugId | 1 | Using where; Distinct | | 5 | DERIVED | BugRev | ref | BugId | BugId | 4 | isupport.BugAgent.BugId | 1 | Distinct | | 5 | DERIVED | Revision | eq_ref | PRIMARY,RevisionId | PRIMARY | 4 | isupport.BugRev.RevisionId | 1 | Using index; Distinct | | 5 | DERIVED | Agent | eq_ref | PRIMARY,AgentId | PRIMARY | 4 | isupport.BugAgent.AgentId | 1 | Distinct | | 6 | DEPENDENT SUBQUERY | AgentCustomBugStatus | ref | AgentId,BugStatusId,Active | AgentId | 4 | | 5 | Using where | | 2 | DERIVED | BugAgent | ref | BugId,AgentId,BugAgentRole | AgentId | 4 | | 322 | Using where; Using temporary; Using filesort | | 2 | DERIVED | Bug | eq_ref | PRIMARY,BugId,CustomerId,BugStatusId,BugTypeId,PriorityId,BugInfo | PRIMARY | 4 | isupport.BugAgent.BugId | 1 | Using where | | 2 | DERIVED | BugStatus | eq_ref | PRIMARY,BugStatusId | PRIMARY | 4 | isupport.Bug.BugStatusId | 1 | | | 2 | DERIVED | Customer | eq_ref | PRIMARY,CustomerId | PRIMARY | 4 | isupport.Bug.CustomerId | 1 | | | 2 | DERIVED | BugType | eq_ref | PRIMARY,BugTypeId | PRIMARY | 4 | isupport.Bug.BugTypeId | 1 | | | 2 | DERIVED | Priority | eq_ref | PRIMARY,PriorityId | PRIMARY | 4 | isupport.Bug.PriorityId | 1 | | | 2 | DERIVED | BugRev | ref | BugId | BugId | 4 | isupport.BugAgent.BugId | 1 | | | 2 | DERIVED | Revision | eq_ref | PRIMARY,RevisionId | PRIMARY | 4 | isupport.BugRev.RevisionId | 1 | | | 4 | DEPENDENT SUBQUERY | AgentViewBugRole | ref | AgentId,AgentRoleId | AgentId | 4 | | 1 | Using where | | 3 | DEPENDENT SUBQUERY | AgentCustomBugStatus | ref | AgentId,BugStatusId,Active | AgentId | 4 | | 5 | Using where | +----+--------------------+----------------------+--------+------------------------------------------------------------------ -+-------------+---------+--------------------------------+------+----------------------------------------------+ 36 rows in set (0.02 sec)