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

opt: prune unnecessary check columns #56007

Merged
merged 1 commit into from
Oct 28, 2020

Commits on Oct 27, 2020

  1. opt: prune unnecessary check columns

    This commit updates the optimizer to prune synthesized `CHECK`
    constraint columns for `UPDATES` when columns referenced in the
    constraints are not updated. This may also allow the optimizer to no
    longer fetch those referenced columns.
    
    This should provide a performance benefit for `UDPATE`s to tables with
    check constraints. Notably, tables that have been given many column
    families (in order to reduce contention) should see a significant
    reduction in contention for `UPDATE`s that mutate a subset of column
    families.
    
    Informs cockroachdb#51526
    
    Release note (performance improvement): Previously, all `CHECK`
    constraints defined on a table would be tested for every `UPDATE` to the
    table. Now, a check constraint will not be tested for validity when the
    values of columns it references are not being updated. The referenced
    columns are no longer fetchecd in cases where they were only fetched to
    test `CHECK` constraints.
    mgartner committed Oct 27, 2020
    Configuration menu
    Copy the full SHA
    d9a906e View commit details
    Browse the repository at this point in the history