![]() |
|
Archives of the TeradataForumMessage Posted: Fri, 13 Aug 2010 @ 20:27:07 GMT
<-- 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
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||