{"push_id":1128697256,"size":1,"distinct_size":1,"ref":"refs/heads/row-limit","head":"972d353af7689beac9576846841023605cd10c88","before":"a581907bdde763da1ddb5a9c96a401619274233b","commits":[{"sha":"972d353af7689beac9576846841023605cd10c88","author":{"email":"ec1657b07dda0ff6262dc7efd2e7e3cc188a9ea2@gmail.com","name":"Radu Berinde"},"message":"sql: only process one row when aggregating with MIN/MAX and the order matches\n\nWhen we are grouping for MIN/MAX, we try to get the underlying plan's ordering\nto match the function (i.e. increasing for MIN, decreasing for MAX). If the\nordering does match, we only need to read the first row.\n\nWe currently use this fact only in the specific case of using an index and no\nfilters (the index selection code has a special case that limits the span counts\nto 1). But we can apply this optimization in general: we can set a hard limit of\n1 in the plan, and only read one row.\n\nAdding a test that uses EXPLAIN (DEBUG) to verify we don't buffer more than one\nrow.\n\nThis generalized path will cover the index case as well and we will remove the\nspecial optimization in a separate commit.","distinct":true,"url":"https://api.github.com/repos/RaduBerinde/cockroach/commits/972d353af7689beac9576846841023605cd10c88"}]}
{"actor":{"display_login":"RaduBerinde"}}