MySQL Indexing - text
Embed
You can embed this paste into a blog or website with this code:
<iframe class="codetidy" type="text/html" width="100%" src="http://codetidy.com/paste/embed/2886" frameborder="0"></iframe>
mysql> EXPLAIN SELECT * FROM abcd tick WHERE tick.ID LIKE '74597';

+----+-------------+-------+------+------------------------+------+---------+---

---+------+-------------+

| id | select_type | table | type | possible_keys | key | key_len | re

f | rows | Extra |

+----+-------------+-------+------+------------------------+------+---------+---

---+------+-------------+

| 1 | SIMPLE | tick | ALL | email_extid,abcd,abcde | NULL | NULL | NU

LL | 161 | Using where |

+----+-------------+-------+------+------------------------+------+---------+---

---+------+-------------+

1 row in set (0.00 sec)

mysql> EXPLAIN SELECT * FROM abcd tick WHERE tick.ID = '74597';

+----+-------------+-------+------+------------------------+-------------+------

---+-------+------+-------+

| id | select_type | table | type | possible_keys | key | key_l

en | ref | rows | Extra |

+----+-------------+-------+------+------------------------+-------------+------

---+-------+------+-------+

| 1 | SIMPLE | tick | ref | email_extid,abcd,abcde | email_extid | 4

| const | 1 | |

+----+-------------+-------+------+------------------------+-------------+------

---+-------+------+-------+

1 row in set (0.00 sec)
