Can GROUP BY still be optimized after all these years?

(pivotlake.io)

48 points | by ntur1337 3 days ago

1 comments

  • toddbandrowsky 16 minutes ago
    You know, I have a hard time seeing how it can be cheaper to run a dataset across a wire rather than just send its grouped results. That's really the problem. I mean, who cares if it takes 100ns to group by on a box when it will take 10 times much for the data to get to it and back.

    The fastest possible group by is in sequential memory on that box, fetched from an nvme.

    So, when we do group by partitioning, we're really saying, put the groups themselves on different boxes, and group the group by. If it were some utter megaset, the place to put it is on a mainframe, which is basically created for purposes of group by on ridiculous datasets.

    • asdf88990 14 minutes ago
      group by is useful with other aggregates like sum, max, and so on.