Archives of the TeradataForum
Message Posted: Thu, 02 Aug 2012 @ 16:09:01 GMT
Subj: | | Re: Removing duplicates in Multiset table |
|
From: | | td newsgroup |
the below procedure should be OK in case the number of duplicates is small in comparison to the total number of rows.
1. detect the duplicates via OLAP or GROUP BY query - can be done in smaller pieces (like one partition at the time, if the table is
partitioned) and copy the duplicated into a SET tmp table (same DDL and (P)PI as the huge table).
2. delete all rows from the huge table which are in the set table - take care of nulls in case they exists.
3. ins / select all rows from the tmp table into the huge table.
Ulrich
|