MySQL Forums
Forum List  »  Optimizer & Parser

Explain plan--join type
Posted by: Amy Ng
Date: October 05, 2011 11:10PM

Dear ladies and gentlemen :)

How are you doing? This is my 1st post :)

I am learning various join types from the output of the explain plan, and found an article here: http://dev.mysql.com/doc/refman/5.0/en/explain-output.html. However, I am still struggling to understand the concept. Could someone please tell me the differences between these 3 join types?

1. const:If the table has at most one matching row, then why the article stated "const is used when you compare ALL parts of a PRIMARY KEY or UNIQUE index to constant values". What does it mean "ALL parts of the PK"?

2. eq_ref: what does it really mean "One row is read from the table for each combination of rows from the previous tables"? Can someone elaborate a bit?

3. ref:


Thank you for reading my post.

--Amy

Options: ReplyQuote


Subject
Views
Written By
Posted
Explain plan--join type
2508
October 05, 2011 11:10PM
1178
October 07, 2011 12:41AM


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.