the explain of this sentence shows that mysql uses temporary tables, and
this was slow (think about the sentence only takes one record in his Limit
Clause)

of course all the fields used in relations and orders in the sentence are
primary keys.

SELECT CPOSTAL.* FROM CPOSTAL left JOIN PROVINCI ON CPOSTAL.COD=PROVINCI.COD
AND CPOSTAL.PAIS=PROVINCI.PAIS ORDER BY CPOSTAL.IND LIMIT 1



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to