Archives of the TeradataForum
Message Posted: Thu, 20 Jul 2006 @ 12:57:15 GMT
If I add 3 columns to a table via a single Alter statement, is it equivalent to issuing 3 indepent alter statements sequentially (as the way stats are done), or are the 3 columns added in a single pass? When I looked at the explain plan, I couldn't really tell which step was adding the columns to the table. The 3 parallel inserts into DBC.TVFields seems like the obvious step, however, I'm of the impression that this is just the addition column attributes for the dbc.columns view.
Explanation 1) First, we lock a distinct WORK_TABLES."pseudo table" for exclusive use on a RowHash to prevent global deadlock for WORK_TABLES.Batch_Control. 2) Next, we lock WORK_TABLES.Batch_Control for exclusive use. 3) We lock DBC.TVM for write on a RowHash, we lock DBC.TVFields for write on a RowHash, and we lock DBC.Indexes for write on a RowHash. 4) We execute the following steps in parallel. 1) We do a single-AMP ABORT test from DBC.TVM by way of the unique primary index. 2) We do an INSERT into DBC.TVFields. 3) We do an INSERT into DBC.TVFields. 4) We do an INSERT into DBC.TVFields. 5) We do a single-AMP UPDATE from DBC.TVM by way of the unique primary index with no residual conditions. 6) We do a single-AMP UPDATE from DBC.DBCAssociation by way of the unique primary index with no residual conditions. 5) We modify the table header. 6) We spoil the parser's dictionary cache for the table. 7) 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.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|