From: Robert Haas <robertmhaas@gmail.com>
To: Jaime Casanova <jcasanov@systemguards.com.ec>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: decibel <decibel@decibel.org>
Cc: psql performance list <pgsql-performance@postgresql.org>
Subject: Re: [PERFORMANCE] work_mem vs temp files issue
Date: Wed, 13 Jan 2010 10:23:32 -0500
Message-ID: <603c8f071001130723v634cb3c3u1604ea69efb04e91@mail.gmail.com> (raw)
In-Reply-To: <3073cc9b1001122231m1a15d187lae2a8096a813361b@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>
<18803.1263241120@sss.pgh.pa.us>
<3073cc9b1001122231m1a15d187lae2a8096a813361b@mail.gmail.com>
On Wed, Jan 13, 2010 at 1:31 AM, Jaime Casanova
<jcasanov@systemguards.com.ec> wrote:
> On Mon, Jan 11, 2010 at 3:18 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>
>> 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?
>>
>
> some time ago, you said:
> """
> It might be useful to turn on trace_sort to see if the small files
> are coming from sorts. If they're from hashes I'm afraid there's
> no handy instrumentation ...
> """
>
> and is clearly what was bother me... because most of all temp files
> are coming from hash...
>
> why we don't show some of that info in explain? for example: we can
> show memory used, no? or if the hash goes to disk... if i remove
> #ifdef HJDEBUG seems like we even know how many batchs the hash
> used...
I had an idea at one point of making explain show the planned and
actual # of batches for each hash join. I believe that "actual # of
batches > 1" is isomorphic to "hash join went to disk". The code is
actually pretty easy; the hard part is figuring out what to do about
the UI. The choices seem to be:
1. Create a new EXPLAIN option just for this - what would we call it?
2. Think of some more, similar things and come up with a new EXPLAIN
option covering all of them - what else would go along with?
3. Sandwhich it into an existing EXPLAIN option, most likely VERBOSE.
4. Display it by default.
...Robert
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: robertmhaas@gmail.com, jcasanov@systemguards.com.ec, tgl@sss.pgh.pa.us, decibel@decibel.org
Subject: Re: [PERFORMANCE] work_mem vs temp files issue
In-Reply-To: <603c8f071001130723v634cb3c3u1604ea69efb04e91@mail.gmail.com>
* 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