EXPLAIN SELECT messageblk, is_header FROM dbmail_messageblks WHERE physmessage_id = 1314716 ORDER BY messageblk_idnr: *** row 1 *** table: dbmail_messageblks type: index possible_keys: physmessage_id_is_header_index key: PRIMARY key_len: 8 ref: NULL rows: 2163086 Extra: Using where show create table dbmail_messageblks; +--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | dbmail_messageblks | CREATE TABLE `dbmail_messageblks` ( `messageblk_idnr` bigint(21) NOT NULL AUTO_INCREMENT, `physmessage_id` bigint(21) NOT NULL DEFAULT '0', `messageblk` longblob NOT NULL, `blocksize` bigint(21) NOT NULL DEFAULT '0', `is_header` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`messageblk_idnr`), KEY `physmessage_id_is_header_index` (`physmessage_id`,`is_header`) ) ENGINE=InnoDB AUTO_INCREMENT=2466226 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (messageblk_idnr) PARTITIONS 16 */ | +--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ show index from dbmail_messageblks; +--------------------+------------+--------------------------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | +--------------------+------------+--------------------------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+ | dbmail_messageblks | 0 | PRIMARY | 1 | messageblk_idnr | A | 2098848 | NULL | NULL | | BTREE | | | dbmail_messageblks | 1 | physmessage_id_is_header_index | 1 | physmessage_id | A | 2098848 | NULL | NULL | | BTREE | | | dbmail_messageblks | 1 | physmessage_id_is_header_index | 2 | is_header | A | 2098848 | NULL | NULL | | BTREE | | +--------------------+------------+--------------------------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+ 3 rows in set (54.51 sec) 02:25:23> explain partitions SELECT messageblk, is_header FROM dbmail_messageblks WHERE physmessage_id = 1314716 ORDER BY messageblk_idnr; +----+-------------+--------------------+-------------------------------------------------------+-------+--------------------------------+---------+---------+------+---------+-------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+--------------------+-------------------------------------------------------+-------+--------------------------------+---------+---------+------+---------+-------------+ | 1 | SIMPLE | dbmail_messageblks | p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15 | index | physmessage_id_is_header_index | PRIMARY | 8 | NULL | 2150055 | Using where | +----+-------------+--------------------+-------------------------------------------------------+-------+--------------------------------+---------+---------+------+---------+-------------+ 1 row in set (0.00 sec) 02:25:33> select MOD(1314716,16); +-----------------+ | MOD(1314716,16) | +-----------------+ | 12 | +-----------------+ 1 row in set (0.00 sec)