List:Internals« Previous MessageNext Message »
From:MARK CALLAGHAN Date:August 1 2009 3:41pm
Subject:why does UNION ALL use a temp table?
View as plain text  
Why does UNION ALL always use a temp table?  It would be more
efficient to send the result from each branch of a UNION ALL directly
to the network rather than buffering it in a temp table first until
all branches have been evaluated. Some apps use UNION ALL to improve
performance by reducing round trips between the app and the server,
but the use of a temp table in MySQL reduces the benefit of that.

-- 
Mark Callaghan
mdcallag@stripped
Thread
why does UNION ALL use a temp table?MARK CALLAGHAN1 Aug
  • Re: why does UNION ALL use a temp table?Sergei Golubchik1 Aug
  • Re: why does UNION ALL use a temp table?Eric Jensen1 Aug
    • Re: why does UNION ALL use a temp table?dormando2 Aug