I'm running a group by query on a table with over a billion rows and my memory usage is seemingly growing without bounds. Eventually the mem usage exceeds my physical memory and everything starts swapping.
I guess I didn't ask my question. Is this expected behavior? Is there any way for me to adjust my settings to avoid using so much memory?