Re: further explain changes

From: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: further explain changes
Date: 2010-01-30 17:26:41
Message-ID: 3073cc9b1001300926h2845f6d5p75f4c70a222ba8e8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 28, 2010 at 4:18 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Sun, Jan 24, 2010 at 12:30 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Robert Haas <robertmhaas(at)gmail(dot)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 Memory Usage: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alex Hunsaker 2010-01-30 18:08:26 Re: Package namespace and Safe init cleanup for plperl [PATCH]
Previous Message Alvaro Herrera 2010-01-30 16:54:37 Re: mailing list archiver chewing patches