sql中有not in,尝试改成not exists,可能产生BroadcastNestedLoopJoin,导致广播无法禁掉。
禁止使用广播变量的配置参数 spark.sql.autoBroadcastJoinThreshold = -1
not in 改成not exists 等同于

本文探讨了SQL中notin与notexists的区别及其对查询性能的影响。尤其关注将notin转换为notexists可能导致的BroadcastNestedLoopJoin问题,并介绍了如何通过调整spark配置参数来避免广播变量的使用。
sql中有not in,尝试改成not exists,可能产生BroadcastNestedLoopJoin,导致广播无法禁掉。
禁止使用广播变量的配置参数 spark.sql.autoBroadcastJoinThreshold = -1
not in 改成not exists 等同于

1190
1514
484
366
347

被折叠的 条评论
为什么被折叠?
