optimizer: Make compute_fast_path_clusters
use fast_path_optimizer
#33038
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fast_path_optimizer
didn't exist whencompute_fast_path_clusters
was written, so it uses the full optimizer on each of the other clusters. This can be very slow despitePLAN_INSIGHTS_NOTICE_FAST_PATH_CLUSTERS_OPTIMIZE_DURATION
being set to 10ms, because it might happen that optimization for the originally targeted clsuter is fast due to a useful index, but optimizations for any other cluster is slow, due to not having useful indexes. We suspect that this happened yesterday here.testing: There is an existing test:
materialize/test/sqllogictest/explain/plan_insights.slt
Lines 794 to 807 in 605dea9
Motivation
Tips for reviewer
Checklist
$T ⇔ Proto$T
mapping (possibly in a backwards-incompatible way), then it is tagged with aT-proto
label.