Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Fri, 20 Mar 2009 @ 10:11:48 GMT

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

Subj:   Re: Why redistribution in this select with UNION
From:   DWellman

Hi Simard,

Based on my understanding (and experience) you're correct in your original guess, because you're using UNION.

The UNION function means "do NOT return duplicate rows". The way that Teradata does this is to hash distribute each row on a hash of the entire row before eliminating duplicate rows. As you've seen, even when you have the same PI, because the rows are based on their ** entire ** contents, just having the same PI is irrelevant (to the UNION processing).

To avoid the redistribution what you could try is:

1) An MSR. Teradata will silently drop duplicate rows during the insert processing.

(if the above doesn't work)

2) Try multiple insert/selects from a single source table into the target one. All apart from the first one will write a TJ, but that may be better/quicker than the redistribution.



Ward Analytics Ltd: Information in motion ( www.ward-analytics.com )

  <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