MySQL Forums
Forum List  »  Optimizer & Parser

Two columns indexes
Posted by: Roy Chan
Date: March 20, 2011 10:37PM

I have a table with ip_from and ip_to as double,
This is the query i want to optimize:

select * from mapping where ip_from < 999617043 and ip_to > 999617043;

I tried adding index for (ip_from, ip_to), but it seems it wasn't any faster.

How should I add the index to make this query faster?

Thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
Two columns indexes
2066
March 20, 2011 10:37PM
1192
March 22, 2011 07:54AM


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.