+----+-------------+----------------------+--------+-----------------------------------+---------+---------+----------------------------------+------+----------------------------------------------+
| id | select_type | table                | type   | possible_keys                     | key     | key_len | ref                              | rows | Extra                                        |
+----+-------------+----------------------+--------+-----------------------------------+---------+---------+----------------------------------+------+----------------------------------------------+
|  1 | SIMPLE      | main                 | range  | PRIMARY,Users3                    | PRIMARY | 4       | NULL                             | 1317 | Using where; Using temporary; Using filesort | 
|  1 | SIMPLE      | Principals_1         | eq_ref | PRIMARY                           | PRIMARY | 4       | rt3.main.id                      |    1 | Using where; Distinct                        | 
|  1 | SIMPLE      | CachedGroupMembers_2 | ref    | DisGrouMem,GrouMem,group1,member1 | member1 | 5       | rt3.Principals_1.id              |    1 | Using where; Distinct                        | 
|  1 | SIMPLE      | ACL_4                | range  | ACL1                              | ACL1    | 54      | NULL                             |  296 | Using where; Using index; Distinct           | 
|  1 | SIMPLE      | Groups_3             | eq_ref | PRIMARY,Groups1,Groups2           | PRIMARY | 4       | rt3.CachedGroupMembers_2.GroupId |    1 | Using where; Distinct                        | 
+----+-------------+----------------------+--------+-----------------------------------+---------+---------+----------------------------------+------+----------------------------------------------+
+---------------+-----------+
| PrincipalType | COUNT(id) |
+---------------+-----------+
| Group         |       298 | 
+---------------+-----------+
+----+-------------+-------+-------+---------------+------+---------+------+------+--------------------------+
| id | select_type | table | type  | possible_keys | key  | key_len | ref  | rows | Extra                    |
+----+-------------+-------+-------+---------------+------+---------+------+------+--------------------------+
|  1 | SIMPLE      | ACL_4 | range | ACL1          | ACL1 | 54      | NULL |  296 | Using where; Using index | 
+----+-------------+-------+-------+---------------+------+---------+------+------+--------------------------+
+--------------------+
| COUNT(Groups_3.id) |
+--------------------+
|                  0 | 
+--------------------+
+----+-------------+----------+-------+-----------------+---------+---------+-------------------------+------+--------------------------+
| id | select_type | table    | type  | possible_keys   | key     | key_len | ref                     | rows | Extra                    |
+----+-------------+----------+-------+-----------------+---------+---------+-------------------------+------+--------------------------+
|  1 | SIMPLE      | ACL_4    | range | ACL1            | ACL1    | 54      | NULL                    |  296 | Using where; Using index | 
|  1 | SIMPLE      | Groups_3 | ref   | Groups1,Groups2 | Groups2 | 67      | rt3.ACL_4.PrincipalType | 1345 | Using where; Using index | 
+----+-------------+----------+-------+-----------------+---------+---------+-------------------------+------+--------------------------+
+----+-------------+-------+-------+---------------+------+---------+------+------+--------------------------+
| id | select_type | table | type  | possible_keys | key  | key_len | ref  | rows | Extra                    |
+----+-------------+-------+-------+---------------+------+---------+------+------+--------------------------+
|  1 | SIMPLE      | ACL_4 | range | ACL1          | ACL1 | 54      | NULL |  296 | Using where; Using index | 
+----+-------------+-------+-------+---------------+------+---------+------+------+--------------------------+
+----+-------------+----------+-------+-----------------+---------+---------+-------------------------+------+--------------------------+
| id | select_type | table    | type  | possible_keys   | key     | key_len | ref                     | rows | Extra                    |
+----+-------------+----------+-------+-----------------+---------+---------+-------------------------+------+--------------------------+
|  1 | SIMPLE      | ACL_4    | range | ACL1            | ACL1    | 54      | NULL                    |  296 | Using where; Using index | 
|  1 | SIMPLE      | Groups_3 | ref   | Groups1,Groups2 | Groups2 | 67      | rt3.ACL_4.PrincipalType | 1345 | Using where; Using index | 
+----+-------------+----------+-------+-----------------+---------+---------+-------------------------+------+--------------------------+
+----+-------------+-------+-------+---------------+------+---------+------+------+--------------------------+
| id | select_type | table | type  | possible_keys | key  | key_len | ref  | rows | Extra                    |
+----+-------------+-------+-------+---------------+------+---------+------+------+--------------------------+
|  1 | SIMPLE      | ACL_4 | range | ACL1          | ACL1 | 54      | NULL |  296 | Using where; Using index | 
+----+-------------+-------+-------+---------------+------+---------+------+------+--------------------------+
+----+-------------+----------+-------+-----------------+---------+---------+-------------------------+------+--------------------------+
| id | select_type | table    | type  | possible_keys   | key     | key_len | ref                     | rows | Extra                    |
+----+-------------+----------+-------+-----------------+---------+---------+-------------------------+------+--------------------------+
|  1 | SIMPLE      | ACL_4    | range | ACL1            | ACL1    | 54      | NULL                    |  296 | Using where; Using index | 
|  1 | SIMPLE      | Groups_3 | ref   | Groups1,Groups2 | Groups2 | 67      | rt3.ACL_4.PrincipalType | 1345 | Using where; Using index | 
+----+-------------+----------+-------+-----------------+---------+---------+-------------------------+------+--------------------------+
+--------------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table              | Non_unique | Key_name   | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+--------------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| CachedGroupMembers |          0 | PRIMARY    |            1 | id          | A         |       99912 |     NULL | NULL   |      | BTREE      |         | 
| CachedGroupMembers |          1 | DisGrouMem |            1 | GroupId     | A         |       99912 |     NULL | NULL   | YES  | BTREE      |         | 
| CachedGroupMembers |          1 | DisGrouMem |            2 | MemberId    | A         |       99912 |     NULL | NULL   | YES  | BTREE      |         | 
| CachedGroupMembers |          1 | DisGrouMem |            3 | Disabled    | A         |       99912 |     NULL | NULL   |      | BTREE      |         | 
| CachedGroupMembers |          1 | GrouMem    |            1 | GroupId     | A         |       99912 |     NULL | NULL   | YES  | BTREE      |         | 
| CachedGroupMembers |          1 | GrouMem    |            2 | MemberId    | A         |       99912 |     NULL | NULL   | YES  | BTREE      |         | 
| CachedGroupMembers |          1 | group1     |            1 | GroupId     | A         |       99912 |     NULL | NULL   | YES  | BTREE      |         | 
| CachedGroupMembers |          1 | member1    |            1 | MemberId    | A         |       99912 |     NULL | NULL   | YES  | BTREE      |         | 
+--------------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
