Skip to content

Commit

Permalink
Reduce optimizer.max-reordered-joins default to 8
Browse files Browse the repository at this point in the history
Reduces planning time for tpcds/q64 from 11.8s to 6.6s
  • Loading branch information
raunaqmorarka committed Apr 3, 2024
1 parent b40521b commit 6b0b2e8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/sphinx/admin/properties-optimizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 6b0b2e8

Please sign in to comment.