MySQL Forums
Forum List  »  Performance

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

You are correct. After some more test, it appears that it sometimes uses the index and sometimes it doesn't. I think it has something to do with the number of records matching one part of the "where" clause. If this number of matching records for half the "where" clause is too big, it does a table scan. I looked it up in the MySQL docs and that is indeed the case.

Is there a way I can speedup such queries? Perhaps by redesigning the table or use multiple tables?

Options: ReplyQuote


Subject
Views
Written By
Posted
3144
April 27, 2005 06:21AM
1988
April 27, 2005 06:39AM
Re: Multi-column index issue?
2191
April 27, 2005 06:47AM
1940
April 27, 2005 07:19AM
2114
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.