News for hackers. Stuff that matters.
Re:The Curious Case of the Aggregation Query by HDThoreaun on Tuesday December 05, 2023 @03:36PM (#38536561)
As an employee at a database company working on the plan optimizer I would like to ask you not to use correlated subqueries for my own sanity. Close to 100% of the mind blowing bugs are correlated subqueries. Kidding of course but holy shit my life would be so much easier without them.
Re:The Curious Case of the Aggregation Query by nimish on Tuesday December 12, 2023 @12:46PM (#38615633)
I am curious as to why. They should be represented like joins, right?
Re:The Curious Case of the Aggregation Query by HDThoreaun on Monday December 18, 2023 @02:27PM (#38687019)
They’re slow as fuck and most of them can be rewritten to not be correlated, so we attempt to heavily rewrite them. There’s basically an entire subfield of cs research that focuses on strategies for rewriting CSQs and the papers have gotten progressively more and more complicated making them very difficult to reproduce without bugs. I’ve spent easily weeks just reading these papers let alone implementing them.
Re:The Curious Case of the Aggregation Query by nimish on Friday December 29, 2023 @02:55PM (#38809463)
I'd love to read a deep dive on this. Database implementation internals are always very interesting.