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

release-22.2: opt: fixup CTE stats on placeholder queries #100327

Merged
merged 1 commit into from
Apr 3, 2023

Commits on Mar 31, 2023

  1. opt: fixup CTE stats on placeholder queries

    During optbuilder phase we copy the initial expressions stats into the
    fake-rel but this value can change when placeholders are assigned so add
    code in AssignPlaceholders to rebuild the cte if the stats change.
    
    Fixes: cockroachdb#99389
    Epic: none
    Release note (sql change): Prepared statements using placeholders in
    recursive CTEs sometimes did not re-optimize correctly after plugging
    in the parameters leading to poor plan choices, this has been fixed.
    cucaroach committed Mar 31, 2023
    Configuration menu
    Copy the full SHA
    e205d16 View commit details
    Browse the repository at this point in the history