MySQL Forums
Forum List  »  Optimizer & Parser

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

Hi

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??

Thanks
Ade

Options: ReplyQuote


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


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.