News for hackers. Stuff that matters.
Re:Don't use DISTINCT as a "join-fixer" by thehours on Saturday October 21, 2023 @02:33AM (#37964593)
> There was another interesting use case I wrote about a few years ago that showed how changing DISTINCT to GROUP BY – even though it carries the same semantics and produces the same results – can help SQL Server filter out duplicates earlier and have a serious impact on performance.

I recently learned this is also what Amazon recommends when querying Spectrum. [1]

[1] https://aws.amazon.com/blogs/big-data/10-best-practices-for-...

Re:Don't use DISTINCT as a "join-fixer" by aib on Sunday October 22, 2023 @05:44AM (#37974048)
This is ridiculous! Someone should fix it and send a p—oh.