# Secondary Index (Continue...)

__*Secondary Index*__

```8
tidb> explain select name, gravity from planets where gravity between 5 and 10;
+-------------------------+---------+-----------+---------------+-------------------------------------------------------------------+
| id                      | estRows | task      | access object | operator info                                                     |
+-------------------------+---------+-----------+---------------+-------------------------------------------------------------------+
| TableReader_7           | 4.01    | root      |               | data:Selection_6                                                  |
| └─Selection_6           | 4.01    | cop[tikv] |               | ge(universe.planets.gravity, 5), le(universe.planets.gravity, 10) |
|   └─~!@TableFullScan_5@!~     | 422.00  | cop[tikv] | table:planets | keep order:false                                                  |
+-------------------------+---------+-----------+---------------+-------------------------------------------------------------------+
3 rows in set (0.00 sec)

tidb> alter table planets add key (gravity);
Query OK, 0 rows affected (3.62 sec)

tidb> explain select name, gravity from planets where gravity between 5 and 10;
+-------------------------------+---------+-----------+---------------------------------------+------------------------------------+
| id                            | estRows | task      | access object                         | operator info                      |
+-------------------------------+---------+-----------+---------------------------------------+------------------------------------+
| IndexLookUp_10                | 4.00    | root      |                                       |                                    |
| ├─IndexRangeScan_8(Build)     | 4.00    | cop[tikv] | table:planets, index:gravity(gravity) | range:[5.0,10.0], keep order:false |
| └─TableRowIDScan_9(Probe)     | 4.00    | cop[tikv] | table:planets                         | keep order:false                   |
+-------------------------------+---------+-----------+---------------------------------------+------------------------------------+
3 rows in set (0.00 sec)

```
------------------------------------------------------------
[no notes]