Re: Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries - Mailing list pgsql-performance

From Claudio Freire
Subject Re: Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries
Date
Msg-id CAGTBQpYGwEu__NzmrHXG865CL7thGESDaLp1D6SA6HHYT4r5yQ@mail.gmail.com
Whole thread Raw
In response to Re: Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-performance
On Mon, Nov 5, 2012 at 1:44 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
>> Well, I'm pretty sure that having more work_mem is a good thing (tm)
>> normally ;-)
>
> In my experience when doing sorts in isolation, having more work_mem
> is a bad thing, unless it enables you to remove a layer of
> tape-merging.  I always blamed it on the L1/L2 etc. levels of caching.

Blame it on quicksort, which is quite cache-unfriendly.

Perhaps PG should consider using in-memory mergesort for the bigger chunks.


pgsql-performance by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries
Next
From: Jeff Janes
Date:
Subject: Re: Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries