Re: Merge join and index scan strangeness - Mailing list pgsql-hackers

From Yeb Havinga
Subject Re: Merge join and index scan strangeness
Date
Msg-id 4B7E976B.5070103@gmail.com
Whole thread Raw
In response to Re: Merge join and index scan strangeness  (Teodor Sigaev <teodor@sigaev.ru>)
List pgsql-hackers
Teodor Sigaev wrote:
>
>> I found something strange with merge join. Let there are two table
>
> Sorry, postgresql's version is 8.4 from today CVS
For what it's worth - 8.4.0 gives as expected.

aap=# explain UPDATE   t1
SET   f1 = t1.f1 || t2.f1
FROM   t2
WHERE   t2.f1 = t1.f1 AND   t2.f2 = t1.f2 AND   t2.f3 = t1.f3 AND   t2.f4 = t1.f4
;                                        QUERY 
PLAN                                         
---------------------------------------------------------------------------------------------Merge Join
(cost=0.00..28522.60rows=1 width=142)  Merge Cond: ((t1.f1 = t2.f1) AND (t1.f2 = t2.f2) AND (t1.f3 = t2.f3) 
 
AND (t1.f4 = t2.f4))  ->  Index Scan using i1 on t1  (cost=0.00..26090.94 rows=234839 
width=110)  ->  Index Scan using i2 on t2  (cost=0.00..77.25 rows=600 width=104)
(4 rows)




pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: PGXS: REGRESS_OPTS=--load-language=plpgsql
Next
From: Kenneth Marshall
Date:
Subject: Re: Avoiding bad prepared-statement plans.