Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 25 Jul 2002 @ 07:32:40 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: UNION ALL
 
From:   Klaus Dittrich

David Clough wrote:

  Has anybody experienced execution times between two tables involving a UNION ALL resulting in much longer total times than those arising from two single statements?  



Hello,

we experienced the same problem using UNION ALL some time ago.

We merged to tables into one bigger table, all having the same layout, like

INSERT INTO C
SELECT * FROM A
UNION ALL
SELECT * FROM B
;


Table A had the size of 20 GB, Table B of 2 GB, so the target table (and the spool used) would be around 22 GB.

In fact, a spool of 80 GBs, i.e. four times more than the data to be copied, was used for this statement, and it took longer than expected. So far nobody from NCR could us explain why, but we think it's a bug. I think it's the same problem that occurs to you.

When we changed into a multi-statement, we got the right execution time and a used spool space of approx. 22 GB.

(i.e. INSERT INTO C SELECT * FROM A
;INSERT INTO C SELECT * FROM B
;


Regards

Klaus Dittrich

--
Klaus Dittrich
Vodafone D2 GmbH
FECD - Data Management



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023