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
3337
April 27, 2005 06:21AM
2087
April 27, 2005 06:39AM
Re: Multi-column index issue?
2309
April 27, 2005 06:47AM
2036
April 27, 2005 07:19AM
2224
April 27, 2005 07:34AM
3524
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.