MySQL Forums
Forum List  »  General

Re: Multi-column key and SELECT query
Posted by: Mickael Garnier
Date: January 24, 2005 05:13AM

Have you tried to look at the result of :
EXPLAIN SELECT ... WHERE col1 op ? AND col2 op ? AND ... colN op ?

It will tell you which key is used.
In your case, if the first col used in the where clause is the first col in your key, It must use the index key, otherwise it will not use it.

Bye

Options: ReplyQuote


Subject
Written By
Posted
Re: Multi-column key and SELECT query
January 24, 2005 05:13AM


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.