Hi. Run EXPLAIN for both queries and see if it explains the difference (my first guess is be that the indexes support the one query, but not the other).
Also, what does "never finishes" mean? Please list the processlist (using SHOW or mysqladmin) and have a look at the state of the query. Bye, Benjamin. On Mon, Apr 29, 2002 at 05:48:16PM +0100, [EMAIL PROTECTED] wrote: > Hi, > > Hope you don't mind me hassling you about this yet again. > > >> ... So you would need to run two queries, a LEFT JOIN and a > >> RIGHT JOIN (or a LEFT JOIN with tables swapped) to get all > >> results. > > ... ... which is what I did in the end. > except that on further checking it doesn't work! > > This works fine: > SELECT dancedetails.dances.* FROM dancedetails.dances > LEFT JOIN dancedata.dances > ON dancedetails.dances.ddref=dancedata.dances.dkey > WHERE dancedata.dances.dkey IS NULL; > > But this never finishes: > SELECT dancedata.dances.* FROM dancedata.dances > LEFT JOIN dancedetails.dances > ON dancedata.dances.dkey=dancedetails.dances.ddref > WHERE dancedetails.dances.ddref IS NULL; > > And I don't understand why, for the life of me. > > Donna > > (PS: and I *have* RTFM) -- [EMAIL PROTECTED] --------------------------------------------------------------------- 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