Re: [PERFORMANCE] work_mem vs temp files issue - Mailing list pgsql-performance

From decibel
Subject Re: [PERFORMANCE] work_mem vs temp files issue
Date
Msg-id B43373EF-4CFC-4643-AB6E-5BC0D4A7EB58@decibel.org
Whole thread Raw
In response to [PERFORMANCE] work_mem vs temp files issue  (Jaime Casanova <jcasanov@systemguards.com.ec>)
Responses Re: [PERFORMANCE] work_mem vs temp files issue  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
On Aug 19, 2009, at 7:45 PM, Jaime Casanova wrote:
> AFAIUI, work_mem is used for some operations (sort, hash, etc) for
> avoiding the use of temp files on disk...
>
> In a client server i'm monitoring (pg 8.3.7, 32GB of ram) work_mem is
> set to 8MB, however i'm seeing a lot of temp files (>30000 in 4 hours)
> with small sizes (ie: 2021520 obviously lower than 8MB). so, why?
> maybe we use work_mem until we find isn't enough and we send just the
> difference to a temp file?
>
> i'm not thinking in raising work_mem until i understand this well,
> what's the point if we still create temp files that could fit in
> work_mem...


Are you using temp tables? Those end up in pgsql_tmp as well.
--
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828



pgsql-performance by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Persistent Plan Cache
Next
From: Tom Lane
Date:
Subject: Re: [PERFORMANCE] work_mem vs temp files issue