Tom Lane wrote:
Rich Doughty <[EMAIL PROTECTED]> writes:
Tom Lane wrote:
The reason these are different is that the second case constrains only
the last-to-be-joined table, so the full cartesian product of t and h1
has to be formed. If this wasn't what you had in mind, you might be
able to r
In this particular case both outer joins are to the same table, and
the where clause is applied to one or the other, so it's pretty easy
to prove that they should generate identical results. I'll grant that
this is not generally very useful; but then, simple test cases often
don't look very useful
Rich Doughty <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> The reason these are different is that the second case constrains only
>> the last-to-be-joined table, so the full cartesian product of t and h1
>> has to be formed. If this wasn't what you had in mind, you might be
>> able to rearrange
Tom Lane wrote:
Rich Doughty <[EMAIL PROTECTED]> writes:
EXPLAIN SELECT *
FROM
tokens.ta_tokens t LEFT JOIN
tokens.ta_tokenhist h1 ON t.token_id = h1.token_id LEFT JOIN
tokens.ta_tokenhist h2 ON t.token_id = h2.token_id
WHERE
h1.histdate = 'now';
EXPLAIN SELECT *
F
Rich Doughty <[EMAIL PROTECTED]> writes:
> EXPLAIN SELECT *
> FROM
> tokens.ta_tokens t LEFT JOIN
> tokens.ta_tokenhist h1 ON t.token_id = h1.token_id LEFT JOIN
> tokens.ta_tokenhist h2 ON t.token_id = h2.token_id
> WHERE
> h1.histdate = 'now';
> EXPLAIN SELECT *
> FR
I tried on pgsql-general but got no reply. re-posting here as it's
probably the best place to ask
I'm having some significant performance problems with left join. Can
anyone give me any pointers as to why the following 2 query plans are so
different?
EXPLAIN SELECT *
FROM
tokens.ta_tokens