MySQL Forums
Forum List  »  Optimizer & Parser

does Select values effect index selection?
Posted by: ade br
Date: January 10, 2006 09:30AM


I have been writing a query that contains a total of 9 tables, I am fairly sure that all the joins and where components have correct indexes however depending on the fields i put in the select statement the query takes up to 10 times as long.

Using the explain command I discovered that when i remove a certain field the query stops using a certain index and instead uses no index for that table(join). All the rest of the query is the same so i do not know why this would occur.

Does anyone know how the fields selected effects the optimisers choice of index??


Options: ReplyQuote

Written By
does Select values effect index selection?
January 10, 2006 09:30AM

Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

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.