From: | Yeb Havinga <yebhavinga(at)gmail(dot)com> |
---|---|
To: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Merge join and index scan strangeness |
Date: | 2010-02-19 13:51:39 |
Message-ID: | 4B7E976B.5070103@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.60 rows=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)
From | Date | Subject | |
---|---|---|---|
Next Message | Kenneth Marshall | 2010-02-19 13:57:51 | Re: Avoiding bad prepared-statement plans. |
Previous Message | Alvaro Herrera | 2010-02-19 13:36:42 | Re: PGXS: REGRESS_OPTS=--load-language=plpgsql |