Can you extract a self-contained test case that uses unreasonable amounts of memory? It seems from this trace that the wheels are coming off in at least two places, but identifying exactly where is impossible without more info.
I will try to make a test case. The data in this table is PII so I can't just export it, but I might be able to replicate using fake data.
Will try in the next few days and hopefully post back.