gpt4 book ai didi

apache-spark - 禁用 Spark 催化剂优化器

转载 作者:行者123 更新时间:2023-12-03 16:04:26 24 4
gpt4 key购买 nike

为了提供一些背景知识,我尝试在有和没有Spark的催化剂优化程序的情况下在Spark上运行TPCDS基准测试。对于较小数据集上的复杂查询,我们可能比实际执行计划花费更多的时间来优化计划。因此,想要衡量优化程序对查询整体执行的性能影响

有没有办法禁用某些或所有 Spark 催化剂优化规则?

最佳答案

此功能已作为SPARK-24802中Spark-2.4.0的一部分添加。

val OPTIMIZER_EXCLUDED_RULES = buildConf("spark.sql.optimizer.excludedRules")
.doc("Configures a list of rules to be disabled in the optimizer, in which the rules are " +
"specified by their rule names and separated by comma. It is not guaranteed that all the " +
"rules in this configuration will eventually be excluded, as some rules are necessary " +
"for correctness. The optimizer will log the rules that have indeed been excluded.")
.stringConf
.createOptional


您可以找到优化器规则 here的列表。
但理想情况下,我们不应该禁用这些规则,因为它们中的大多数都能带来性能上的好处。我们应该确定消耗时间的规则,并检查是否对查询没有用,然后将其禁用。

关于apache-spark - 禁用 Spark 催化剂优化器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50268704/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com