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.
Subject
Views
Written By
Posted
24392
October 09, 2006 06:34AM
8984
October 09, 2006 08:11AM
7513
October 10, 2006 12:23AM
6839
October 10, 2006 08:45AM
6535
October 12, 2006 07:57PM
6513
October 09, 2006 09:40AM
Re: How to speed up query of indexed column with 5M rows?
6110
October 09, 2006 08:39PM
5082
October 09, 2006 07:54PM
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.