title: why the select query behaviour is different with single quotes in where condition and without single quotes
body: <p>I have observed different behaviours when executing a query with single quotes and without single quotes.</p>
  
  <p>With single quotes (<code>'121'</code>) I got the result quickly and query is using index well.  But without single quotes, the query is not using the index and response time is high.</p>
  
  <pre><code>mysql&gt; explain  select * from tbl_n1 where id =121;
  +----+-------------+----------------------+------+---------------+------+---------+------+--------+-------------+
  | id | select_type | table                | type | possible_keys | key  | key_len | ref  | rows   | Extra       |
  +----+-------------+----------------------+------+---------------+------+---------+------+--------+-------------+
  |  1 | SIMPLE      | tbl_n1               | ALL  | n1_id      | NULL | NULL    | NULL | 286929 | Using where |
  +----+-------------+----------------------+------+---------------+------+---------+------+--------+-------------+
  1 row in set (0.00 sec)
  
  mysql&gt; explain  select * from tbl_n1 where id ='121';
  +----+-------------+----------------------+------+---------------+----------+---------+-------+------+-------------+
  | id | select_type | table                | type | possible_keys | key      | key_len | ref   | rows | Extra       |
  +----+-------------+----------------------+------+---------------+----------+---------+-------+------+-------------+
  |  1 | SIMPLE      | tbl_n1               | ref  | n1_id       | n1_id  | 53      | const |   29 | Using where |
  +----+-------------+----------------------+------+---------------+----------+---------+-------+------+-------------+
  1 row in set (0.00 sec)
  
  
  show create table tbl_n1\G
  ....
  ....
   `id` varchar(10)  DEFAULT NULL,
  ....
  ....
  ....
  </code></pre>