On Sat, 2008-05-31 at 11:53 -0700, Josh Berkus wrote: > Simon, > > > There is an optimum for each specific sort. > > Well, if the optimum is something other than "as much as we can get", then we > still have a pretty serious issue with work_mem, no? Depends upon your view of serious I suppose. I would say it is an acceptable situation, but needs further optimization. I threw some ideas around on Hackers around Dec/New Year, but I don't have time to work on this further myself in this dev cycle. Further contributions welcome. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support