Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 04 Jan 2001 @ 23:46:13 GMT


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


Subj:   Re: Union Conundrum
 
From:   Jim Downey

...just a couple of thoughts....

Are the PI's on both tables exactly the same? We had a case where CASE SPECIFIC differences caused redistribution (although I did not see evidence in the explain)

The union all preserves duplicate rows which is presumably what you want. Do the duplicates product join creating an answer set larger than you expect? Can you change to a union?

You tried breaking each of the select statements into two components. Can you run a concatenated insert into a temp table to see how the union works:

insert into T1 select * from T2
;insert into T1 select * from T3

If you haven;t done this before the key is that the second insert is right next to the semicolon of the first. Teradata treats both inserts as if they are into an empty table so nothing is journaled. I think this acts as a union instead of union all where duplicates are discarded no matter how the table is defined.



     
  <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: 27 Dec 2016