Re: Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries

From: Claudio Freire <klaussfreire(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Gunnar Nick Bluth <gunnar(dot)bluth(at)pro-open(dot)de>, Petr Praus <petr(at)praus(dot)net>, Marcos Ortiz <mlortiz(at)uci(dot)cu>, postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries
Date: 2012-11-05 16:48:55
Message-ID: CAGTBQpYGwEu__NzmrHXG865CL7thGESDaLp1D6SA6HHYT4r5yQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Nov 5, 2012 at 1:44 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Janes 2012-11-05 17:09:08 Re: Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries
Previous Message Jeff Janes 2012-11-05 16:44:34 Re: Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries