On 2006-01-15 15:42, Tom Lane wrote:
EXPLAIN SELECT count(*) FROM "Extra" FULL JOIN "GeoRestrict" ON callsign ~ pattern WHERE geo_region = 4;

Oh, but that reduces it to a left join, as you can see in the EXPLAIN
output ---
Yes, I previously noticed that in the EXPLAIN output too.

 any null-extension rows from the right side are going to fail
the WHERE condition anyway, so the planner simplifies the FULL JOIN to a
LEFT JOIN.  If you'd eliminate the WHERE altogether then the failure
will come back.

Tried that, and you are right there as well.

So, given the fact that the right-hand-table is only about 15 rows, do you think changing the SELECT back to a LEFT JOIN, and then using a UNION to get the extra right-hand-rows in, is the best work-around?

-- Dean


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to