Oooh... I forgot all about SELECT DISTINCT ON despite having used it once in the past.
SELECT DISTINCT ON
I think that would work.
What version of postgres is lfgss on? Pre 9.6 wasn't multithreaded, and pre 12, CTEs (and sub queries?) were basically optimisation fences.
If a DISTINCT ON causes performance issues, upgrading postgres could be a solution
At this point in time I may have to admit it's an old PostgreSQL version.
If anyone is extremely comfortable with upgrading Postgres please let me know, would love to get us to latest stable.
We are on 9.2 with the ltree module installed.
@cyclotron3k started
London Fixed Gear and Single-Speed is a community of predominantly fixed gear and single-speed cyclists in and around London, UK.
This site is supported almost exclusively by donations. Please consider donating a small amount regularly.
Oooh... I forgot all about
SELECT DISTINCT ON
despite having used it once in the past.I think that would work.