List:General Discussion« Previous MessageNext Message »
From:Roger Baklund Date:October 15 2003 1:15pm
Subject:Re: LEFT JOIN help (or "come and slap the newbie")
View as plain text  
* D. R. Hansen
> At 03:51 AM 10/15/03, Diana Soares wrote:
> >You're confusing the left/right "sides" of LEFT JOIN...
> >Using LEFT JOIN, it is the right table that is dependent on the left
> >table. All results from left table are selected.
> >So you may try:
[...]
> I believe I tried that -- but when I did (and I just repeated it with the
> same result) mysql effectively hangs (i.e. the query takes interminably
> long -- I let it run for 20 minutes before killing it).
>
> So should I be looking at an indexing issue?  Right now the only things
> indexed in the tables are their PKs -- their IDs.  city has about 30K
> records; zip has about 40K.

Yes, you need to index you FK's.

--
Roger

Thread
LEFT JOIN help (or "come and slap the newbie")D. R. Hansen14 Oct
  • Re: LEFT JOIN help (or "come and slap the newbie")Diana Soares15 Oct
    • Re: LEFT JOIN help (or "come and slap the newbie")D. R. Hansen15 Oct
      • Re: LEFT JOIN help (or "come and slap the newbie")Roger Baklund15 Oct
    • Re: LEFT JOIN help (or "come and slap the newbie")Dan Hansen16 Oct
  • Re: LEFT JOIN help (or "come and slap the newbie")Hans van Harten30 Dec