Re: in-memory sorting - Mailing list pgsql-performance

From Samuel Gendler
Subject Re: in-memory sorting
Date
Msg-id AANLkTi=4U7m-PViREaJxAgXrjdvQ6juJmJEWkSfGSvZ6@mail.gmail.com
Whole thread Raw
In response to in-memory sorting  (Samuel Gendler <sgendler@ideasculptor.com>)
Responses Re: in-memory sorting
Re: in-memory sorting
Re: in-memory sorting
List pgsql-performance
Answered my own question.  Cranking work_mem up to 350MB revealed that
the in-memory sort requires more memory than the disk sort.

On Wed, Aug 18, 2010 at 10:23 PM, Samuel Gendler
<sgendler@ideasculptor.com> wrote:
> I've got this explain: http://explain.depesz.com/s/Xh9
>
> And these settings:
> default_statistics_target = 50 # pgtune wizard 2010-08-17
> maintenance_work_mem = 1GB # pgtune wizard 2010-08-17
> constraint_exclusion = on # pgtune wizard 2010-08-17
> checkpoint_completion_target = 0.9 # pgtune wizard 2010-08-17
> effective_cache_size = 36GB # sam
> work_mem = 288MB # pgtune wizard 2010-08-17
> wal_buffers = 8MB # pgtune wizard 2010-08-17
> #checkpoint_segments = 16 # pgtune wizard 2010-08-17
> checkpoint_segments = 30 # sam
> shared_buffers = 11GB # pgtune wizard 2010-08-17
> max_connections = 80 # pgtune wizard 2010-08-17
> cpu_tuple_cost = 0.0030                 # sam
> cpu_index_tuple_cost = 0.0010           # sam
> cpu_operator_cost = 0.0005              # sam
> #random_page_cost = 2.0                 # sam
>
> I'm not understanding why it is sorting on disk if it would fit within
> a work_mem segment - by a fairly wide margin.  Is there something else
> I can do to get that sort to happen in memory?
>

pgsql-performance by date:

Previous
From: Samuel Gendler
Date:
Subject: in-memory sorting
Next
From: Pavel Stehule
Date:
Subject: Re: in-memory sorting