|
|
Archives of the TeradataForum
Message Posted: Fri, 21 Nov 2003 @ 12:56:26 GMT
Subj: | | A couple of questions on an explain text |
|
From: | | Narayan Murthy |
I have a couple of questions w.r.t the explain statement below :
1. In Step 2 of the explain we see 3 writes and a read, but in Step 3 we see 4 writes and a read - why is this difference.
2. There is another DBC table(DBC.Next) that gets updated apart from TVM, TVFields, Dbase, Indexes & Accessrights - but
why isn't there a mention of DBC.Next in the Explain output
Narayan
-------------
explain
create table t1(
c1 int,
c2 char);
Explanation -------------------------------------------------- | |
| 1) | First, we lock CHK.t1 for exclusive use.
| |
| 2) | Next, we lock a distinct DBC."pseudo table" for write on a RowHash for deadlock prevention, we lock a distinct DBC."pseudo table" for
read on a RowHash for deadlock prevention, we lock a distinct DBC."pseudo table" for write on a RowHash for deadlock prevention, we lock a
distinct DBC."pseudo table" for write on a RowHash for deadlock prevention.
| |
| 3) | We lock DBC.DBase for read on a RowHash, we lock DBC.TVM for write on a RowHash, we lock DBC.TVFields for write on a RowHash, we lock
DBC.AccessRights for write on a RowHash, 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.DBase by way of the unique primary index.
| | |
| |
| 2) | We do a single-AMP ABORT test from DBC.TVM by way of the unique primary index.
| | |
| |
| 3) | We do an INSERT into DBC.TVFields (no lock required).
| | |
| |
| 4) | We do an INSERT into DBC.TVFields (no lock required).
| | |
| |
| 5) | We do an INSERT into DBC.Indexes (no lock required).
| | |
| |
| 6) | We do an INSERT into DBC.TVM (no lock required).
| | |
| |
| 7) | We INSERT default rights to DBC.AccessRights for CHK.t1.
| | |
| 5) | We create the table header.
| |
| 6) | 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.
| |
| |