Re: [PERFORMANCE] work_mem vs temp files issue

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, decibel <decibel(at)decibel(dot)org>, psql performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: [PERFORMANCE] work_mem vs temp files issue
Date: 2010-01-11 20:18:40
Message-ID: 18803.1263241120@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec> writes:
> LOG: begin tuple sort: nkeys = 1, workMem = 1024, randomAccess = f
> LOG: switching to bounded heapsort at 641 tuples: CPU 0.08s/0.13u sec elapsed 0.25 sec
> LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp8507.5", size 471010
> LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp8507.10", size 81096
> LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp8507.0", size 467373
> LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp8507.9", size 110200
> LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp8507.3", size 470011
> LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp8507.8", size 157192
> LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp8507.4", size 468681
> LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp8507.12", size 101624
> LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp8507.1", size 472285
> LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp8507.11", size 100744
> LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp8507.6", size 467173
> LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp8507.7", size 141888
> LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp8507.2", size 476227
> LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp8507.13", size 89072
> LOG: performsort starting: CPU 0.10s/0.19u sec elapsed 0.33 sec
> LOG: performsort done: CPU 0.10s/0.19u sec elapsed 0.33 sec
> LOG: internal sort ended, 118 KB used: CPU 0.10s/0.19u sec elapsed 0.33 sec

Hmm. Not clear where the temp files are coming from, but it's *not* the
sort --- the "internal sort ended" line shows that that sort never went
to disk. What kind of plan is feeding the sort node?

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2010-01-11 20:25:57 Re: performance config help
Previous Message Scott Marlowe 2010-01-11 20:16:45 Re: performance config help