求教key_len是4是怎么算的,数据库编码为utf8mysql> desc t1;
+-------------+-------------+------+-----+---------+----------------+
| Field       | Type        | Null | Key | Default | Extra          |
+-------------+-------------+------+-----+---------+----------------+
| id          | int(11)     | NO   | PRI | NULL    | auto_increment |
| assist_id   | int(11)     | NO   |     | NULL    |                |
| assist_name | varchar(50) | YES  |     | NULL    |                |
+-------------+-------------+------+-----+---------+----------------+mysql> explain
    -> select * from t1 where id > 1 and id < 5;
+----+-------------+-----------------------+-------+---------------+---------+---------+------+------+-------------+
| id | select_type | table                 | type  | possible_keys | key     | key_len | ref  | rows | Extra       |
+----+-------------+-----------------------+-------+---------------+---------+---------+------+------+-------------+
|  1 | SIMPLE      | t1                    | range | PRIMARY       | PRIMARY | 4       | NULL |    1 | Using where |
+----+-------------+-----------------------+-------+---------------+---------+---------+------+------+-------------+
1 row in set (0.00 sec)