List:General Discussion« Previous MessageNext Message »
From:dave-mlist Date:August 25 2000 6:26pm
Subject:Re: can I do a single natural left join on 3 tables at once?
View as plain text  
Hi Benjamin, thanks for the reply.

>> INSERT INTO D
>> SELECT a.*
>> FROM a NATURAL LEFT JOIN b NATURAL LEFT JOIN c
>> WHERE b.some_id IS NULL AND c.some_id IS NULL
>> ORDER BY a.time DESC
>> LIMIT 1000;

Benjamin> Yes, this should be correct. Why didn't you just try?

My tables contain over 50 million entries *each*, and I couldn't weigh
down the server.  But I ended up making some mock tables and trying it
out.  That confirmed my questions about syntax.  But I also wanted to
get some advice like "you really should use a temp table for this" or
"yes, that is the best way to do it, don't bother using a temp table"
or something.  I really can't test various methods for performance!

Thanks,
Dave
Thread
Help with LIMIT on a select with a left joinDavid BORDAS22 Aug
  • can I do a single natural left join on 3 tables at once?dave-mlist22 Aug
    • Re: can I do a single natural left join on 3 tables at once?Benjamin Pflugmann25 Aug
  • Re: can I do a single natural left join on 3 tables at once?dave-mlist25 Aug