Tom,

On 3/21/06 2:47 PM, "Tom Lane" <[EMAIL PROTECTED]> wrote:

> I'm fairly unconvinced about Simon's underlying premise --- that we
> can't make good use of work_mem in sorting after the run building phase
> --- anyway.  If we cut back our memory usage then we'll be forcing a
> significantly more-random access pattern to the temp file(s) during
> merging, because we won't be able to pre-read as much at a time.

I thought we let the OS do that ;-)

Seriously, I've suggested an experiment to evaluate the effectiveness of
internal buffering with ridiculously low amounts of RAM (work_mem) compared
to bypassing it entirely and preferring the buffer cache and OS I/O cache.
I suspect the work_mem caching of merge results, while algorithmically
appropriate, may not work effectively with the tiny amount of RAM allocated
to it, and could be better left to the OS because of it's liberal use of
read-ahead and disk caching.

Experiment should take but a minute to validate or disprove the hypothesis.

- Luke  



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to