News for hackers. Stuff that matters.
Re:SQL NULLs Are Weird by AlienRobot on Friday January 10, 2025 @11:54AM (#42657372)
It's possible that this is due to the underlying implementation.

In a unique column normally you'll have an index, so NULL becomes a special value in an index, but in SELECT DISTINCT you probably won't have an index, which means a full scan is performed, then every row has to be compared with every other row.

There are no comments on this comment yet.