今天我們來講一下如何看懂hive的查詢計劃。
<b>hive的執行計劃</b>包括三部分:
– abstract syntax tree – 可以直接忽略
– stage dependencies – 依賴
– stage plans – hive如何執行任務的資訊。

下面還是以一個案例作為說明
設定自動連接配接為false的話,要走5步。
4 map reduces tells you something is not right.
stage: stage-1
map reduce
stage: stage-2
stage: stage-3
stage: stage-4
map reduce
設定自動連接配接為true就隻有4步
only 2 map reduces
stage: stage-8
map reduce
hive直接就加載了要做連接配接的表,client和path表,其中client表做了過濾,剩下的map/reduce是用來連接配接和排序的。