mysql explain SELECT FROM roles WHERE name admin and authorizable_type

1
2
3
4
5
6
7
mysql> explain SELECT * FROM `roles` WHERE (name = 'admin' and authorizable_type = 'User' and authorizable_id IS NULL);
+----+-------------+-------+------+-----------------------------------------------------------------------------------+---------------------+---------+-------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+------+-----------------------------------------------------------------------------------+---------------------+---------+-------+------+-------------+
| 1 | SIMPLE | roles | ref | index_roles_on_name,index_roles_on_name_and_authorizable_type_and_authorizable_id | index_roles_on_name | 123 | const | 1 | Using where |
+----+-------------+-------+------+-----------------------------------------------------------------------------------+---------------------+---------+-------+------+-------------+
1 row in set (0.00 sec)