Re: What does "merge-joinable join conditions" mean ????
От | Tom Lane |
---|---|
Тема | Re: What does "merge-joinable join conditions" mean ???? |
Дата | |
Msg-id | 17223.1137363596@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: What does "merge-joinable join conditions" mean ???? (Michael Fuhr <mike@fuhr.org>) |
Список | pgsql-sql |
Michael Fuhr <mike@fuhr.org> writes: > The 8.0.5 Release Notes have the following item, but without seeing > your query it's hard to know whether this fix is relevant to your > problem (the fix mentions RIGHT JOIN; your error says FULL JOIN): Good catch, but that bug was specific to left/right joins (basically, the code failed to force the join to be flipped around when needed). With a FULL JOIN you're stuck ... flipping it doesn't help. The reason it's an issue is that for a FULL JOIN, the executor has to keep track of whether rows on *both* sides of the join have been matched to any rows of the other side. If there are join conditions that are outside the mergejoin list then this requires an indefinitely large amount of state. It'd be possible to teach hash join to implement FULL JOIN (basically, you'd have to add an I've-been-joined flag to each entry in the hash table, and then re-scan the hash table at the end of the join to see which inner-side rows remain unjoined). With this you'd only need one hashable join condition to make it work, whereas the FULL JOIN mergejoin code requires *all* the join conditions to be mergejoinable. The issue hasn't come up often enough to make it seem like a high-priority problem, however. I can only recall one or two people complaining about it in all the time we've had outer-join support. regards, tom lane
В списке pgsql-sql по дате отправления: