Archives of the TeradataForum
Message Posted: Thu, 27 Dec 2012 @ 09:53:33 GMT
| Subj: || || Re: Deleting rows from a table which EXIST in another table |
| From: || || Anomy Anom |
<-- Anonymously Posted: Thursday, December 27, 2012 02:57 -->
Thanks for the reply
> delete from large_table
> WHERE (Col1,Col2)
> IN (SELECT Col1,Col2 from exceptions_table GROUP BY 1,2);
This approach doesn't get around my desire not to have to type all the column names out.
| ||The above query may take hours to delete the data if the table is having 100GB or above data.|| |
The delete should be very quick as there are only a very small number of rows to be removed and therefore transient journal processing should
be minimal. The impact of the size of the table on query performance would depend on the number of Amps on the system.
| ||To deal with GB or TB data deletion, you can use MULTILOAD DELETE mode option.|| |
My desire was to delete a tiny number of rows but I hadn't thought of export / mload delete. Doubt it would be any less typing but thanks for