Christian Hammers wrote:
> 
> Hello list
> 
> While browsing old sources by a former employee I realised that he always
> did comma seperated joins and then a "where"
>         FROM
>           tablea a, tableb b, tablec c
>         WHERE
>           a.id=b.id and b.nr=c.nr
> whereas I learned to do
>         FROM
>           tablea a
>           LEFT JOIN table b USING (id)
>           LEFT JOIN table c USING (nr)
> 
> Is one of the two ways preferred about the other? I like my way as it is
> easier to read and understand but would use anything to gain some speed
> in my 5+ hour selects...
> 
> bye,
> 
>  -christian-
> 


He is doing an inner join, you are doing a left join, they (potentialy)
do not produce the same results.

If you have 5 hour selects you are probably missing some vital indexes, or
you are using a long of  like '%blah' or "OR"

---------------------------------------------------------------------
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