|
|
Archives of the TeradataForum
Message Posted: Wed, 14 Sep 2005 @ 18:38:07 GMT
Subj: | | Re: Difference between Delete and delete All |
|
From: | | Anomy.Anom |
<-- Anonymously Posted: Wednesday, September 14, 2005 14:24 -->
The ALL option is a non-ANSI Teradata extension. As you can see in the explain, there is no difference in the steps that are sent to AMPS.
explain del t1 all;
*** Help information returned. 9 rows.
*** Total elapsed time was 1 second.
Explanation
---------------------------------------------------------------------
1) First, we lock a distinct temp."pseudo table" for write on a
RowHash to prevent global deadlock for temp.t1.
2) Next, we lock temp.t1 for write.
3) We do an all-AMPs DELETE from temp.t1 by way of an all-rows scan
with no residual conditions.
4) We spoil the parser's dictionary cache for the table.
5) Finally, we send out an END TRANSACTION step to all AMPs involved
in processing the request.
-> No rows are returned to the user as the result of statement 1.
BTEQ -- Enter your DBC/SQL request or BTEQ command:
explain del t1;
explain del t1;
*** Help information returned. 9 rows.
*** Total elapsed time was 1 second.
Explanation
---------------------------------------------------------------------
1) First, we lock a distinct temp."pseudo table" for write on a
RowHash to prevent global deadlock for temp.t1.
2) Next, we lock temp.t1 for write.
3) We do an all-AMPs DELETE from temp.t1 by way of an all-rows scan
with no residual conditions.
4) We spoil the parser's dictionary cache for the table.
5) Finally, we send out an END TRANSACTION step to all AMPs involved
in processing the request.
-> No rows are returned to the user as the result of statement 1.
| |