logoalt Hacker News

sgarlandtoday at 12:29 AM1 replyview on HN

The ORM isn’t the performance issue here, it’s the DB. DISTINCT is a form of GROUP BY, and so it brings with it the various limitations imposed by the RDBMS. For example, look at what MySQL requires to use an index to perform a GROUP BY.

0: https://dev.mysql.com/doc/refman/8.4/en/group-by-optimizatio...


Replies

tecoholictoday at 3:05 AM

Ah! I see. Thank you.