![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
0 | 4 |
#2
| |||
| |||
|
|
Description: returns different result for the same result with differnt plans. database: TPC-H with scale factor=1.0 query: 13.sql (TPC-H) |
#3
| |||
| |||
|
|
Description: returns different result for the same result with differnt plans. I ran the query with enable_mergejoin set to on/off, the results are different. Postgres chose Merge Left Join when enable_mergejoin is on and Hash Left Join when it is off. I dumped the results to two files, merge.data and hash.data. Here is the result when I do a diff: |
#4
| |||
| |||
|
|
(BTW, I had sent my first reply and this privately as I'm far from sure of myself in these questions, so but feel free to reply to either publicly if you want to, or I can re-reply publicly.) |
|
On Fri, 2004-09-17 at 15:10, Tom Lane wrote: Mark Shewmaker <mark (AT) primefactor (DOT) com> writes: the code would skip processing those batches altogether. Which is fine... unless it's a LEFT JOIN :-(. Would the same problem then also exist for right outer joins? Yup, if the planner chose to flip it into a left join and apply hash joining (which is altogether likely --- merge join is the only executor join method that supports right join directly, and even then only in restricted cases). Okay, so there doesn't need to be any fix for right joins specifically then. (I had seen the "!= JOIN_LEFT" in your patch, which made me wonder whether there was a need for something like a "!= (JOIN_LEFT | JOIN_RIGHT)" in there. Obviously I'm pretty clueless as to whether that's really necessary of course.) |
![]() |
| Thread Tools | |
| Display Modes | |
| |