MySQL Forums
Forum List  »  Performance

Re: Multi-column index issue?
Posted by: Marc Gregoire
Date: April 27, 2005 07:34AM

Yes, I already did that :(

A quote from the SQL docs:
"Each table index is queried, and the best index is used unless the optimizer believes that it is more efficient to use a table scan. At one time, a scan was used based on whether the best index spanned more than 30% of the table. The optimizer is more complex and bases its estimate on additional factors such as table size, number of rows, and I/O block size, so a fixed percentage no longer determines the choice between using an index or a scan."

I think that is exactly my problem.
Now I wonder if there is a way to redesign my table so that queries like:
SELECT result FROM test WHERE SGSN_IP_1<="1644167936" AND SGSN_IP_2>="1644167936"
are fast?

Options: ReplyQuote


Subject
Views
Written By
Posted
3314
April 27, 2005 06:21AM
2079
April 27, 2005 06:39AM
2299
April 27, 2005 06:47AM
2025
April 27, 2005 07:19AM
Re: Multi-column index issue?
2210
April 27, 2005 07:34AM
3505
April 27, 2005 11:47AM


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.