入れ子結合を使用しない結合計画 - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQLリクエストおよびトランザクション処理

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
2019年3月
Language
日本語
Last Update
2019-10-29
dita:mapPath
ja-JP/arh1512079329802.ditamap
dita:ditavalPath
ja-JP/arh1512079329802.ditaval
dita:id
B035-1142
Product Category
Software
Teradata Vantage

入れ子結合を使用しない結合計画について

入れ子結合を使用しない場合は、最適化ルーチンで次の結合計画が生成されます。

操作 結合テーブル 処理時間合計
Spool 1: 積結合 duped table_1,

direct table_2

1時間15分

実行時間の見積もりの合計は、1時間15分です。

最適化しない結合計画のEXPLAIN出力

入れ子結合が使用されないときに、次の部分的EXPLAIN出力が生成されます。

2) Next, we do an all-AMPs RETRIEVE step from test.tab1 by way of an
   all-rows scan with no residual conditions into Spool 2, which is
   duplicated on all AMPs. The size of Spool 2 is estimated to be 4
   rows. The estimated time for this step is 0.08 seconds.
3) We do an all-AMPs JOIN step from Spool 2 (Last Use) by way of an
   all-rows scan, which is joined to test.tab2. Spool 2 and test.tab2
   are joined using a product join, with a join condition of
   (“Spool_2.y1 = test.tab2.y2"). The result goes into Spool 1, which 
   is built locally on the AMPs. The size of Spool 1 is estimated to
   be 2 rows. The estimated time for this step is 1 hour and 15 
   minutes.