root@ 14:37: [sbtest1]> show create table sbtest1\G
*************************** 1. row ***************************
Table: sbtest1
Create Table: CREATE TABLE `sbtest1` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`k` int(10) unsigned NOT NULL DEFAULT '0',
`c` char(120) NOT NULL DEFAULT '',
`pad` char(60) NOT NULL DEFAULT '',
`in_time` date DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `k_1` (`k`),
KEY `idx_k_pad` (`k`,`pad`)
) ENGINE=InnoDB AUTO_INCREMENT=500001 DEFAULT CHARSET=utf8mb4 MAX_ROWS=1000000
1 row in set (0.00 sec)
root@ 14:38: [sbtest1]> explain select * from sbtest1 where k='3' and pad='2342';
+----+-------------+---------+------------+------+---------------+-----------+---------+-------------+------+----------+-------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+---------+------------+------+---------------+-----------+---------+-------------+------+----------+-------+
| 1 | SIMPLE | sbtest1 | NULL | ref | idx_k_pad | idx_k_pad | 244 | const,const | 1 | 100.00 | NULL |
+----+-------------+---------+------------+------+---------------+-----------+---------+-------------+------+----------+-------+
1 row in set, 1 warning (0.00 sec)
`k` int(10) 4*10=40
`pad` char(60) 60*3=180