Hey Mark,
Comparing performance of both approaches (“University” vs. distinct on) is an interesting comparison. I do believe that results may vary for each specific use case. It’s possible you got better perf using the “Universty” approach because of indexes you have on the table (?).

I actually wrote about *another* approach to fetching the last version of a row using an “array trick”. Feel free to check it out as well.

Full Stack Developer, Team Leader, Independent. More from me at https://hakibenita.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store