pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jaime Casanova <jcasanov@systemguards.com.ec>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: decibel <decibel@decibel.org>
Cc: psql performance list <pgsql-performance@postgresql.org>
Subject: Re: [PERFORMANCE] work_mem vs temp files issue
Date: Mon, 11 Jan 2010 15:18:40 -0500
Message-ID: <18803.1263241120@sss.pgh.pa.us> (raw)
In-Reply-To: <3073cc9b1001111116x53427c9bm1e448128a3b4f6c6@mail.gmail.com>
References: <3073cc9b0908191745o3dc63d95q6b9308ef5bd199f2@mail.gmail.com>
	<B43373EF-4CFC-4643-AB6E-5BC0D4A7EB58@decibel.org>
	<25315.1252881420@sss.pgh.pa.us>
	<3073cc9b1001111015t3888cbbex7171d61b952218da@mail.gmail.com>
	<603c8f071001111107v75276375g4d626dfc0efd8dc4@mail.gmail.com>
	<3073cc9b1001111114j7ddacd56p8966f9d61997a8b@mail.gmail.com>
	<3073cc9b1001111116x53427c9bm1e448128a3b4f6c6@mail.gmail.com>

Jaime Casanova <jcasanov@systemguards.com.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



view thread (16+ messages)  latest in thread

Message-ID: <18803.1263241120@sss.pgh.pa.us>
Permalink:  ../18803.1263241120@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18803.1263241120@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jcasanov@systemguards.com.ec, robertmhaas@gmail.com, decibel@decibel.org
  Subject: Re: [PERFORMANCE] work_mem vs temp files issue
  In-Reply-To: <18803.1263241120@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox