Re: [GENERAL] work_mem = 900MB but Sort Method: external merge Disk: 304008kB

2011-02-22 Thread Tom Lane
Andreas Kretschmer writes: > Tom Lane wrote: >> Reid Thompson writes: >>> What am I missing that causes this to resort to sorting on disk? >> >> The in-memory space required to sort N tuples can be significantly >> larger than the on-disk space, > Question: when is the planner making the decis

Re: [GENERAL] work_mem = 900MB but Sort Method: external merge Disk: 304008kB

2011-02-22 Thread Reid Thompson
On 02/22/2011 12:06 PM, Tom Lane wrote: > Reid Thompson writes: >> What am I missing that causes this to resort to sorting on disk? > > The in-memory space required to sort N tuples can be significantly > larger than the on-disk space, because the latter representation is > optimized to be small

Re: [GENERAL] work_mem = 900MB but Sort Method: external merge Disk: 304008kB

2011-02-22 Thread Andreas Kretschmer
Tom Lane wrote: > Reid Thompson writes: > > What am I missing that causes this to resort to sorting on disk? > > The in-memory space required to sort N tuples can be significantly > larger than the on-disk space, because the latter representation is > optimized to be small and the in-memory rep

Re: [GENERAL] work_mem = 900MB but Sort Method: external merge Disk: 304008kB

2011-02-22 Thread Tom Lane
Reid Thompson writes: > What am I missing that causes this to resort to sorting on disk? The in-memory space required to sort N tuples can be significantly larger than the on-disk space, because the latter representation is optimized to be small and the in-memory representation not so much. I hav

Re: [GENERAL] work_mem = 900MB but Sort Method: external merge Disk: 304008kB

2011-02-22 Thread Andreas Kretschmer
Reid Thompson wrote: > What am I missing that causes this to resort to sorting on disk? > > obc=# select version(); > version > -- > PostgreSQ

[GENERAL] work_mem = 900MB but Sort Method: external merge Disk: 304008kB

2011-02-22 Thread Reid Thompson
What am I missing that causes this to resort to sorting on disk? obc=# select version(); version -- PostgreSQL 8.3.7 on x86_64-redhat-linux-gnu,