我是 Teradata 的新手。谁能告诉我 AMP 究竟如何有助于在 Teradata 中创建任何表。让我们有一个场景。我有一个带有 4 个 AMP 的 Teradata 数据库。我了解到,当我们将数据插入表中时,AMP 会很有用。根据索引,它将在受人尊敬的 AMP 的帮助下分发数据。但是在创建表时,该命令只需要通过 AMP 执行。所以我想知道那个时候会使用哪个AMP??
问问题
1703 次
1 回答
1
数据字典中表的实际创建是一个 RowHash 级别的操作,涉及单个 AMP 以将记录存储在 DBC.TVM 中。根据 EXPLAIN 中列出的其他操作,可能还涉及其他 AMP,但没有单一的 All-AMP 操作。(这没有考虑数据的加载及其在 AMP 中的分布。)
示例说明:
1) First, we lock FUBAR.ABC 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
write on a RowHash for deadlock prevention, we lock a distinct
DBC."pseudo table" for read on a RowHash for deadlock prevention,
and 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.Indexes for
write on a RowHash, we lock DBC.TVFields for write on a RowHash,
we lock DBC.TVM for write on a RowHash, and we lock
DBC.AccessRights 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.Indexes (no lock required).
4) We do an INSERT into DBC.TVFields (no lock required).
5) We do an INSERT into DBC.TVM (no lock required).
6) We INSERT default rights to DBC.AccessRights for FUBAR.ABC.
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.
于 2011-06-06T21:50:38.693 回答