MariaDB [rt3]> explain extended SELECT DISTINCT main.* FROM Tickets main CROSS J OIN Users Users_3 JOIN Groups Groups_1 ON ( Groups_1.Domain = 'RT::Ticket-Role' ) AND ( Groups_1.Type = 'Requestor' ) AND ( Groups_1.Instance = main.id ) LEFT JOIN CachedGroupMembers CachedGroupMembers_2 ON ( CachedGroupMembers_2.MemberId = Users_3.id ) AND ( CachedGroupMembers_2.GroupId = Groups_1.id ) WHERE (Users _3.EmailAddress = 'systems@api-digital.com') AND (main.Status != 'deleted') AND ( ( main.Owner = '2281908' OR ( CachedGroupMembers_2.id IS NOT NULL ) ) AND ( main.Status = 'new' OR main.Status = 'open' ) ) AND (main.Type = 'ticket') AND (main.EffectiveId = main.id) ORDER BY main.LastUpdated DESC LIMIT 50; +------+-------------+----------------------+-------+-------------------------------------------------------------------------------------+-------------+---------+--------------------------------+-------+----------+------------------------------------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +------+-------------+----------------------+-------+-------------------------------------------------------------------------------------+-------------+---------+--------------------------------+-------+----------+------------------------------------------------------------------------+ | 1 | SIMPLE | Users_3 | ref | Users4 | Users4 | 123 | const | 1 | 100.00 | Using where; Using index; Using temporary; Using filesort | | 1 | SIMPLE | main | range | PRIMARY,Tickets2,Tickets6,created,apid_status,apid_owner,apid_type,apid_effectiveid | apid_status | 13 | NULL | 26056 | 75.00 | Using index condition; Using where; Using join buffer (flat, BNL join) | | 1 | SIMPLE | Groups_1 | ref | Groups1,Groups2 | Groups1 | 139 | const,rt3.main.id,const | 1 | 100.00 | Using where; Using index; Distinct | | 1 | SIMPLE | CachedGroupMembers_2 | ref | DisGrouMem,main,SHREDDER_CGM1 | DisGrouMem | 10 | rt3.Groups_1.id,rt3.Users_3.id | 1 | 100.00 | Using where; Using index; Distinct | +------+-------------+----------------------+-------+-------------------------------------------------------------------------------------+-------------+---------+--------------------------------+-------+----------+------------------------------------------------------------------------+