MySQL Forums
Forum List  »  Optimizer & Parser

Re: How to speed up query of indexed column with 5M rows?
Posted by: ryan zheng
Date: October 09, 2006 08:39PM

"ANALYZE TABLE flow " should be the same as "myisamchk -a flow.MYI".

After analyze the table again, mysql truly use the index now.


mysql> explain select * from flow where owner=25514;
+----+-------------+-------+------+-----------------+-----------------+---------+-------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+------+-----------------+-----------------+---------+-------+------+-------------+
| 1 | SIMPLE | flow | ref | flow_fk_owner | flow_fk_owner | 4 | const | 1 | Using where |
+----+-------------+-------+------+-----------------+-----------------+---------+-------+------+-------------+
1 row in set (0.04 sec)

Thanks.
About Larry Kagan and Toa Sty 's solutions, I will try later, and give you a report.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to speed up query of indexed column with 5M rows?
6110
October 09, 2006 08:39PM


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.