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: prefer sorting fewer columns #60469

Merged
merged 1 commit into from
Feb 11, 2021
Merged

Commits on Feb 11, 2021

  1. opt: prefer sorting fewer columns

    Currently, if we have to sort results and project a new column, there
    is no cost difference between the two orders and we happen to prefer
    the sort on top. It is preferable to sort before adding new columns to
    avoid storing the extra value in memory or on disk.
    
    This change improves the sort costing by adding a cost proportional to
    the total number of values.
    
    Fixes cockroachdb#32952.
    RaduBerinde committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    c140110 View commit details
    Browse the repository at this point in the history