MySQL Forums
Forum List  »  Memory Storage Engine

Re: index not used
Posted by: Marco Saba
Date: February 21, 2008 03:43AM

Thanks that was it! Forcing to create a btree index solves the problem and the query is fast.

mysql> alter table mem_count_tmp_xy add key using btree (Postalcode);
Query OK, 2696696 rows affected (11.29 sec)
Records: 2696696 Duplicates: 0 Warnings: 0

+----+-------------+------------------+-------+---------------+------------+---------+------+-------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+------------------+-------+---------------+------------+---------+------+-------+-------------+
| 1 | SIMPLE | mem_count_tmp_xy | range | PostalCode | PostalCode | 9 | NULL | 68338 | Using where |
+----+-------------+------------------+-------+---------------+------------+---------+------+-------+-------------+
1 row in set (0.00 sec)

Options: ReplyQuote


Subject
Views
Written By
Posted
8773
February 20, 2008 06:08AM
5355
February 20, 2008 04:13PM
Re: index not used
5019
February 21, 2008 03:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.