Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(planner): remove statistics collection from bind phase #15112

Merged
merged 22 commits into from
Apr 2, 2024

Conversation

Dousir9
Copy link
Member

@Dousir9 Dousir9 commented Mar 27, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

Extract the logic of binding CTE statistics from the bind phase and move the work of reading metadata and building statistics from the bind phase to optimizer phase, this PR will bring the following two improvements:

  1. After removing read metadata from the bind phase, we do not need to read metadata in some scenarios, which improves the performance.
  2. This PR can improve our query plan because it fixed the bug of some Scan operators in decorrelated subquery don't have statistics, a TPC-DS query get a better join order.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Covered by existing tests

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

@github-actions github-actions bot added the pr-refactor this PR changes the code base without new features or bugfix label Mar 27, 2024
@databendlabs databendlabs deleted a comment from github-actions bot Mar 27, 2024
@databendlabs databendlabs deleted a comment from github-actions bot Mar 27, 2024
@databendlabs databendlabs deleted a comment from github-actions bot Mar 27, 2024
@Dousir9 Dousir9 requested review from leiysky and xudong963 March 30, 2024 13:50
@Dousir9 Dousir9 marked this pull request as ready for review March 30, 2024 13:51
@Dousir9 Dousir9 added this pull request to the merge queue Apr 2, 2024
@BohuTANG BohuTANG removed this pull request from the merge queue due to a manual request Apr 2, 2024
@BohuTANG BohuTANG merged commit 648b1bd into databendlabs:main Apr 2, 2024
72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-refactor this PR changes the code base without new features or bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants