On Thu, 2006-02-23 at 16:10 -0500, Tom Lane wrote:
> I don't want to give up the idea of keeping sort-local data in a
> private
> context --- it just seems cleaner, as well as faster, than letting it
> be
> mixed into the caller's stuff. I can see two alternatives:
Would that be a single context for all sort operations, or a separate
context for each sort within a plan?
There is some evidence that high sort memory is not that useful during
the final merge phase. Would it be possible to have multiple contexts
within each sort e.g. Run Forming context and Final Merge context? That
would then allow us to more easily free the Run Forming context before
moving into the final context with a potentially different size.
Best Regards, Simon Riggs