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
3143
April 27, 2005 06:21AM
1988
April 27, 2005 06:39AM
2191
April 27, 2005 06:47AM
1940
April 27, 2005 07:19AM
Re: Multi-column index issue?
2113
April 27, 2005 07:34AM
3349
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.