# Suboptimal Sql Statement Execution Plan Index Analysis 

+ Each of the 2 columns has an index

```
mysql> SELECT COUNT(*) FROM tods.bus_jijin_trade_record WHERE id >= 177045000;
+-----------+
| COUNT(*)  |
+-----------+
| 145917327 |
+-----------+
1 row in set (16.86   sec)

mysql> SELECT COUNT(*) FROM tods.bus_jijin_trade_record WHERE updated_at > date_sub(now(), interval 48 hour);
+-----------+
|  COUNT(*) |
+-----------+
|    713682 |
+-----------+
```

------------------------------------------------------------
```
mysql> SELECT COUNT(*) FROM tods.bus_jijin_trade_record WHERE id >= 177045000;
+-----------+
| COUNT(*)  |
+-----------+
| 145917327 |
+-----------+
1 row in set (16.86   sec)

mysql> SELECT COUNT(*) FROM tods.bus_jijin_trade_record WHERE updated_at > date_sub(now(), interval 48 hour);
+-----------+
|  COUNT(*) |
+-----------+
|    713682 |
+-----------+
```
You can see that the condition id >= 177045000 for table a (bus_jijin_trade_record) in the statement, and updated_at > date_sub (now (), interval 48 hour), both columns have indexes, but TiDB chose to full table scan anyway. .
