MySQL Forums
Forum List  »  Performance

Re: Slow query
Posted by: Thomas Wiedmann
Date: February 14, 2011 08:12AM

MySQL don't use any index on table ip2isp

We will drop one index and add this two combined index ...

ALTER TABLE 
  DROP KEY isp2idx,
  ADD KEY idx_start_end_loc (start, end, location),
  ADD KEY idx_loc_start_end (location, start, end);

Now test you query and show the EXPLAIN again...

with kind regards,
Thomas

Options: ReplyQuote


Subject
Views
Written By
Posted
3004
February 11, 2011 08:55AM
975
February 12, 2011 03:32PM
1145
February 14, 2011 07:55AM
Re: Slow query
938
February 14, 2011 08:12AM
816
February 14, 2011 09:59AM
709
February 14, 2011 10:57AM
740
February 14, 2011 06:51PM
951
February 15, 2011 03:21AM
1134
February 15, 2011 11:17AM


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.