4 ms·
Postgres Query Optimization: Left Join vs. Union All
- Tostino 4y agoI really wish this left join into union all optimization was applied automatically. There have been multiple discussions on the mailing list over the years, and no movement last I saw. It is such a performance cliff for the type of queries people expect to write when they hit an issue. Having to decompose and rewrite as a union all manually, frankly sucks. I've got a number of these in my application and had to find each and every one by hitting a pathological data case where things started to fail.