postgresql , 10.0 , nestloop , hash join
兩張表join時,如果内表的join字段确定是唯一的,那麼在嵌套循環時,如果外表有重複值,循環過程中,對于内表來說,一個value隻需要掃描一次。
hash join同樣适用。
例子
9.6
10.0
patch如下
這個patch的讨論,詳見郵件組,本文末尾url。
postgresql社群的作風非常嚴謹,一個patch可能在郵件組中讨論幾個月甚至幾年,根據大家的意見反複的修正,patch合并到master已經非常成熟,是以postgresql的穩定性也是遠近聞名的。
<a href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=9c7f5229ad68d7e0e4dd149e3f80257893e404d4">https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=9c7f5229ad68d7e0e4dd149e3f80257893e404d4</a>