On Wed, Jul 21, 2021 at 06:50:58PM +0000, ldh@xxxxxxxxxxxxxxxxxx wrote: > The plans are pretty much identical too. I checked line by line and couldn't see anything much different (note that I have a view over this query). Here is the V13 version of the plan: > I am out of my wits as to what is causing such a massive slowdown and how I could fix it. > > Any idea out there? Could you send the "explain (analyze,buffers,settings) for query on the v11 and v13 instances ? Or a link to the execution plan pasted into explain.depesz.com. https://wiki.postgresql.org/wiki/Slow_Query_Questions#EXPLAIN_.28ANALYZE.2C_BUFFERS.29.2C_not_just_EXPLAIN It might be good to check using a copy of your data that there's no regression between 11.2 and 11.12. -- Justin