kasei / attean

A Perl Semantic Web Framework
19 stars 10 forks source link

Quick hack to let the cheaper left-hand-side win in HashJoin plans #103

Closed kjetilk closed 7 years ago

kjetilk commented 7 years ago

So, I wonder if this could actually do the trick we talked about:

If the $lcost is more than the $rcost, the condition would evaluate to 1, and so the cost is incremented by one, thus penalizing that plan slightly. Should be enough to break the symmetry, right? It assumes that the LHS is what is materialized though, I haven't checked if that is actually the case in the code.

Cheers,

Kjetil

kasei commented 7 years ago

No, it's the right-hand-side that is materialized and put into the hash.

kjetilk commented 7 years ago

Oh, OK. I have turned the inequality... Should work?