diff --git a/core/trino-main/src/main/java/io/trino/sql/planner/OptimizerConfig.java b/core/trino-main/src/main/java/io/trino/sql/planner/OptimizerConfig.java index 46f5971c65c5..592355f53c99 100644 --- a/core/trino-main/src/main/java/io/trino/sql/planner/OptimizerConfig.java +++ b/core/trino-main/src/main/java/io/trino/sql/planner/OptimizerConfig.java @@ -42,7 +42,7 @@ public class OptimizerConfig private double joinMultiClauseIndependenceFactor = 0.25; private JoinReorderingStrategy joinReorderingStrategy = JoinReorderingStrategy.AUTOMATIC; - private int maxReorderedJoins = 9; + private int maxReorderedJoins = 8; private int maxPrefetchedInformationSchemaPrefixes = 100; private boolean enableStatsCalculator = true; diff --git a/core/trino-main/src/test/java/io/trino/cost/TestOptimizerConfig.java b/core/trino-main/src/test/java/io/trino/cost/TestOptimizerConfig.java index 5d779fa0c87c..acda95fce19c 100644 --- a/core/trino-main/src/test/java/io/trino/cost/TestOptimizerConfig.java +++ b/core/trino-main/src/test/java/io/trino/cost/TestOptimizerConfig.java @@ -47,7 +47,7 @@ public void testDefaults() .setJoinDistributionType(JoinDistributionType.AUTOMATIC) .setJoinMultiClauseIndependenceFactor(0.25) .setJoinReorderingStrategy(JoinReorderingStrategy.AUTOMATIC) - .setMaxReorderedJoins(9) + .setMaxReorderedJoins(8) .setMaxPrefetchedInformationSchemaPrefixes(100) .setColocatedJoinsEnabled(true) .setSpatialJoinsEnabled(true) diff --git a/docs/src/main/sphinx/admin/properties-optimizer.md b/docs/src/main/sphinx/admin/properties-optimizer.md index 64b3796f4168..de22a4fd7e1d 100644 --- a/docs/src/main/sphinx/admin/properties-optimizer.md +++ b/docs/src/main/sphinx/admin/properties-optimizer.md @@ -104,7 +104,7 @@ for any reason a cost could not be computed, the `ELIMINATE_CROSS_JOINS` strateg ## `optimizer.max-reordered-joins` - **Type:** {ref}`prop-type-integer` -- **Default value:** `9` +- **Default value:** `8` When optimizer.join-reordering-strategy is set to cost-based, this property determines the maximum number of joins that can be reordered at once.