On Wed, Jan 13, 2010 at 1:31 AM, Jaime Casanova <jcasanov@xxxxxxxxxxxxxxxxxxx> wrote: > On Mon, Jan 11, 2010 at 3:18 PM, Tom Lane <tgl@xxxxxxxxxxxxx> 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 -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance