MySQL Forums
Forum List  »  Newbie

Re: Slow select with sub queries
Posted by: Tom Clark
Date: December 01, 2010 01:56PM

Thank you both, very much. If I understand the suggestion correctly, rather than unnecessarily search through the "Coordinates" table for each row of the "Main" table, this JOIN only searches through rows in the "Coordinates" table where the keys match... Wish I'd thought of that.

The suggestion works very well, by the way. Query took 0.0442 seconds, faster by a factor of 633+. Awesome.

Would either of you (or anyone) care to explain the results of the EXPLAIN SELECT that I included? In particular, I don't understand the NULL values in columns "possible_keys" and "key", and the entries in the "Extra" column.

Thanks again,
Tom



Edited 1 time(s). Last edit at 12/01/2010 02:26PM by Tom Clark.

Options: ReplyQuote


Subject
Written By
Posted
December 01, 2010 03:00AM
Re: Slow select with sub queries
December 01, 2010 01:56PM


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.