From: | Alban Hertroys <alban(at)magproductions(dot)nl> |
---|---|
To: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Plan for outer joins |
Date: | 2006-09-11 09:58:56 |
Message-ID: | 45053360.6020906@magproductions.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I was tuning a join on a few tables for a SELECT COUNT(*) query, when I
realized that the content of the second table didn't actually matter to
the count. So, I figured a LEFT OUTER JOIN would be faster, but...
apparently it's not.
Shouldn't the planner notice that the right part of SELECT COUNT(*) FROM
x LEFT OUTER JOIN y USING (id) isn't relevant for the result and skip
the join?
Attached are the explain plans for both versions and a few variations
(TB wraps it if I paste).
Regards,
--
Alban Hertroys
alban(at)magproductions(dot)nl
magproductions b.v.
T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede
// Integrate Your World //
Attachment | Content-Type | Size |
---|---|---|
explain_joins.txt | text/plain | 3.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2006-09-11 10:00:18 | Re: Child program using parent program's transaction? |
Previous Message | Purusothaman A | 2006-09-11 09:57:09 | Re: [GENERAL] Problem with lo_export() and lo_import() from remote machine. |