Re: [GENERAL] DIfferent plans for explicit versus implicit join using link table

2007-04-26 Thread Tom Lane
"John D. Burger" <[EMAIL PROTECTED]> writes: > Tom Lane replied: >> But the alternative is probably even worse: without that >> allwordrelations has to be joined to w1 and w2 simultaneously, meaning >> that the unconstrained cartesian product of w1 and w2 has to be formed >> first. > Hmm, but woul

Re: [GENERAL] DIfferent plans for explicit versus implicit join using link table

2007-04-26 Thread John D. Burger
Tom Lane replied: I have two queries for looking up related words which I think should be equivalent, but 7.4.8 comes up with very different plans. They're not at all equivalent: If there are duplicate word1id,word2id entries in allwordrelations, the first query will produce duplicate out

Re: [GENERAL] DIfferent plans for explicit versus implicit join using link table

2007-04-26 Thread Tom Lane
"John D. Burger" <[EMAIL PROTECTED]> writes: > I have two queries for looking up related words which I think should > be equivalent, but 7.4.8 comes up with very different plans. They're not at all equivalent: > explain analyze select w2.word from allwords w1 join allwordrelations > as r on (