feat: improve common subplan elimination#19769
Conversation
Docker Image for PR
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 461194d7e3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Keep cross join operand order in the CSE signature so side-swapped plans are not deduplicated and remapped positionally. Add a regression test for swapped cross join operands and refresh the affected explain baseline for cte_prune_columns.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 337dd2c782
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Add recursive stack protection to refresh_scan_ids when rebuilding CSE materialized definitions. Addresses review comment #3150952123.
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
Q88 Performance
Measured with the same TPC-DS Q88 query using
bendsql, comparingenable_cse_optimizer=0andenable_cse_optimizer=1. The result uses 1 warmup run and 4 measured runs, and reports server-side execution time.enable_cse_optimizer=0enable_cse_optimizer=1This improves Q88 by about 55%, reducing average runtime from 54.8s to 24.5s.
Key Changes
MaterializedCTERefstatistics with producer estimates soEXPLAINreflects the updated CTE plan accurately.Tests
Type of change
This change is