MySQL Forums
Forum List  »  General

Multi-column key and SELECT query
Posted by: tumurbaatar
Date: January 20, 2005 05:14AM

A table contains a primary key like this:

PRIMARY KEY (col1, col2,...colN)

and SELECT query like:

SELECT ... WHERE col1 op ? AND col2 op ? AND ... colN op ?

where "op" is some comparision operator (=,<>,>,<...).

Does MySQL use above key to optimize this query? Or I need
to create additional indexes on all fields except col1?

Options: ReplyQuote


Subject
Written By
Posted
Multi-column key and SELECT query
January 20, 2005 05:14AM


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.