Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 13 Aug 2010 @ 20:27:07 GMT


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


Subj:   Re: No Primary Index (NoPI) Table in TD 13
 
From:   Anomy Anom

<-- Anonymously Posted: Friday, August 13, 2010 16:23 -->

Hello,

I don't have acces to a Teradata DB anymore, but maybe you should try to group the data with a unique value to force the redistribution of the lines on the different AMPs.

     INSERT INTO non_skewed_table
     SELECT col1, col2, col3
     FROM skewed_table
     GROUP BY 1,2,3;

Or if you don't have a unique value :

     INSERT INTO non_skewed_table
     SELECT col1, col2, col3
     FROM (
       SELECT col1,col2,col3, ROW_NUMBER() OVER ( ORDER BY col1,col2,col3, ...) rownum
       FROM skewed_table
     ) tmp_table
     GROUP BY rownum;

Hope this helps.


Regards



     
  <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