Re: further explain changes - Mailing list pgsql-hackers

From Jaime Casanova
Subject Re: further explain changes
Date
Msg-id 3073cc9b1001300926h2845f6d5p75f4c70a222ba8e8@mail.gmail.com
Whole thread Raw
In response to Re: further explain changes  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: further explain changes  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Thu, Jan 28, 2010 at 4:18 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Sun, Jan 24, 2010 at 12:30 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Robert Haas <robertmhaas@gmail.com> writes:
>>> On Sun, Jan 24, 2010 at 12:06 AM, Jaime Casanova
>>>> why not let it go in ANALYZE, just as the sort info
>>
>>> It's kinda long-winded - it adds like 4 extra lines for each hash
>>> join.  I don't think I want to add that much clutter to regular E-A
>>> output.
>>
>> Well, that would only happen if you're deliberately obtuse about the
>> formatting.  The sort code manages to fit all the extra on one line,
>> and I don't see why hash couldn't.
>
> OK, here's a new version.
>

OK, i have 3 hashes in a query and i got these 3 lines in an EXPLAIN
ANALYZE with your patch
"""                       ->  Hash  (cost=3878.94..3878.94 rows=83594
width=34) (actual time=504.648..504.648 rows=83594 loops=1)                                Buckets: 2048  Batches: 8
MemoryUsage: 589kB 
[...]                    ->  Hash  (cost=14.49..14.49 rows=649 width=15)
(actual time=2.901..2.901 rows=649 loops=1)                          Buckets: 1024  Batches: 1  Memory Usage: 32kB
[...]              ->  Hash  (cost=977.62..977.62 rows=6555 width=16)
(actual time=60.913..60.913 rows=6556 loops=1)                    Buckets: 1024  Batches: 1  Memory Usage: 308kB
"""

I guess Memory Usage is per Batch, right? is this an average?
What is the unit measure for Bucket?
there are 14 temp files generated for this query and the only Sort
says it was on memory so these files should come from the hashes, can
we say that in the explain analyze? mmm... that memory usage, could be
Disk actually?

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: mailing list archiver chewing patches
Next
From: Alex Hunsaker
Date:
Subject: Re: Package namespace and Safe init cleanup for plperl [PATCH]