{"push_id":2875424918,"size":2,"distinct_size":0,"ref":"refs/heads/master","head":"61dcd6e7b600ccc38bd95824c7b14592e690c37e","before":"62c89841266bbb3e1dee39e27ec6c1ad53518433","commits":[{"sha":"9f80ff8a72a8acf69d9168391ab0ce40d22319df","author":{"name":"Radu Berinde","email":"8cd32adbfdfb986a6f0d684f7a16030a20d97029@cockroachlabs.com"},"message":"opt: adjust cost of the sort wrt key cols\n\nThe cost of the sort takes into account the number of the key columns,\nbecause the more columns we have the more costly each comparison is.\n\nHowever, the cost increase should not be proportional. We only look at\nthe second column when we have equality on the first column; this\nshould normally not be very frequent. This change tweaks the formula\nto apply an \"equality probability\" factor for each subsequent key\ncolumn.\n\nThis fixes cases like sorting twice with distinct-on (once on the\ninput, once on the output) instead of sorting once using all columns.\nThis plan sounds crazy but would actually make sense if the sorting\ncost was proportional to the number of key columns (because the\ndistinct-on output is smaller than the input). Note that these cases\nshowed up recently as a consequence of decreasing\n`unknownDistinctCountRatio` which decreases the row estimate for\ndistinct-on.\n\nFixes #30190.\n\nRelease note: None","distinct":false,"url":"https://api.github.com/repos/cockroachdb/cockroach/commits/9f80ff8a72a8acf69d9168391ab0ce40d22319df"},{"sha":"61dcd6e7b600ccc38bd95824c7b14592e690c37e","author":{"name":"craig[bot]","email":"3a2c29237f73c7cf88424b80e427b1884f346b35@cockroachlabs.com"},"message":"Merge #30202\n\n30202: opt: adjust cost of the sort wrt key cols r=RaduBerinde a=RaduBerinde\n\nThe cost of the sort takes into account the number of the key columns,\r\nbecause the more columns we have the more costly each comparison is.\r\n\r\nHowever, the cost increase should not be proportional. We only look at\r\nthe second column when we have equality on the first column; this\r\nshould normally not be very frequent. This change tweaks the formula\r\nto apply an \"equality probability\" factor for each subsequent key\r\ncolumn.\r\n\r\nThis fixes cases like sorting twice with distinct-on (once on the\r\ninput, once on the output) instead of sorting once using all columns.\r\nThis plan sounds crazy but would actually make sense if the sorting\r\ncost was proportional to the number of key columns (because the\r\ndistinct-on output is smaller than the input). Note that these cases\r\nshowed up recently as a consequence of decreasing\r\n`unknownDistinctCountRatio` which decreases the row estimate for\r\ndistinct-on.\r\n\r\nFixes #30190.\r\n\r\nRelease note: None\n\nCo-authored-by: Radu Berinde <radu@cockroachlabs.com>","distinct":false,"url":"https://api.github.com/repos/cockroachdb/cockroach/commits/61dcd6e7b600ccc38bd95824c7b14592e690c37e"}]}
{"actor":{"display_login":"craig"}}