mysql> explain select count(*) from ctc_sms_ent where nstat=0 and timeMillis>(1321439756000-147000-0) and timeMillis<=1321439756000;
+----+-------------+-------------+-------+---------------+-------------+---------+------+-------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------------+-------+---------------+-------------+---------+------+-------+-------------+
| 1 | SIMPLE | ctc_sms_ent | range | millisIndex | millisIndex | 9 | NULL | 83844 | Using where |
+----+-------------+-------------+-------+---------------+-------------+---------+------+-------+-------------+
1 row in set
mysql> explain select count(*) from ctc_sms_ent where nstat=0 and timeMillis>(1321439756000-147000-1) and timeMillis<=1321439756000;
+----+-------------+-------------+------+---------------+------+---------+------+--------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------------+------+---------------+------+---------+------+--------+-------------+
| 1 | SIMPLE | ctc_sms_ent | ALL | millisIndex | NULL | NULL | NULL | 500039 | Using where |
+----+-------------+-------------+------+---------------+------+---------+------+--------+-------------+
1 row in set
mysql> explain select count(*) from ctc_sms_ent where nstat=0 and timeMillis>(1321439756000-147000+1) and timeMillis<=1321439756000;
+----+-------------+-------------+-------+---------------+-------------+---------+------+-------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------------+-------+---------------+-------------+---------+------+-------+-------------+
| 1 | SIMPLE | ctc_sms_ent | range | millisIndex | millisIndex | 9 | NULL | 83844 | Using where |
+----+-------------+-------------+-------+---------------+-------------+---------+------+-------+-------------+
1 row in set