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 CAGTBQpY-976TKn1Gx53WSPYsjaWOtuTurPywR7Doasji_6cPXA@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  (Claudio Freire <klaussfreire@gmail.com>)
List pgsql-performance
On Mon, Nov 5, 2012 at 2:40 PM, Claudio Freire <klaussfreire@gmail.com> wrote:
> On Mon, Nov 5, 2012 at 2:09 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
>>>> 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.
>>
>> The observation applies to heap sort.
>
> Well, heapsort is worse, but quicksort is also quite bad.

Here[0], an interesting analysis. I really believe quicksort in PG
(due to its more complex datatypes) fares a lot worse.

[0]
http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CD0QFjAB&url=http%3A%2F%2Fwww.cs.auckland.ac.nz%2F~mcw%2FTeaching%2Frefs%2Fsorting%2Fladner-lamarca-cach-sorting.pdf&ei=PPqXUMnEL9PaqQHntoDgDQ&usg=AFQjCNE3mDf6ydj1MHUzfQw13TccOa895A


pgsql-performance by date:

Previous
From: Claudio Freire
Date:
Subject: Re: Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries
Next
From: Claudio Freire
Date:
Subject: Re: Constraint exclusion in views