MySQL Forums
Forum List  »  Performance

Re: Query not using full index
Posted by: Jay Pipes
Date: July 30, 2005 08:16AM

The queries are not equivalent because of the SELECT *.

In the first, you are only returning results from datatable. In the second, all the data fields from both fktable1 and fktable2 tables are returned. If you remove the SELECT * and specify only the datatable fields you wish to return, you should notice that MySQL will "optimize away" the fktable1 and fktable2 results from the second EXPLAIN.

Jay Pipes
Community Relations Manager, North America, MySQL Inc.

Got Cluster? http://www.mysql.com/cluster
Personal: http://jpipes.com

Options: ReplyQuote


Subject
Views
Written By
Posted
2319
July 29, 2005 02:55PM
Re: Query not using full index
1445
July 30, 2005 08:16AM
1389
August 02, 2005 12:34AM


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.