Re: New style of hash join proposal - Mailing list pgsql-hackers

From Tom Lane
Subject Re: New style of hash join proposal
Date
Msg-id 4947.1205801913@sss.pgh.pa.us
Whole thread Raw
In response to Re: New style of hash join proposal  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: New style of hash join proposal
List pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> "Tom Lane" <tgl@sss.pgh.pa.us> writes:
>> Nested Loop  (cost=5.39..198.81 rows=51 width=244)
>> ->  HashAggregate  (cost=1.06..1.11 rows=5 width=4)
>>     ->  Seq Scan on int4_tbl b  (cost=0.00..1.05 rows=5 width=4)
>> ->  Bitmap Heap Scan on tenk1 a  (cost=4.33..39.41 rows=10 width=244)
>> Recheck Cond: (a.thousand = b.f1)
>>     ->  Bitmap Index Scan on tenk1_thous_tenthous  (cost=0.00..4.33 rows=10 width=0)
>> Index Cond: (a.thousand = b.f1)
>> (7 rows)

> Sure, but that's still re-executing the bitmap index scan 51 times -- possibly
> having to fetch the same records off disk repeatedly.

It's not fetching any record repeatedly, because the HashAggregate
step eliminated duplicate keys on the other side.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [something I can't read]
Next
From: Tom Lane
Date:
Subject: Re: Better error message for select_common_type()