Closed nikulinas closed 1 year ago
Hmm. I am not sure that this is a bug. From what I can see the hint behaves as documented: the row estimation is changed in the outer join.
If you think that a different behavior would make more sense, why not sending a patch?
I am testing hint rows and could not make it work. Looks like hint affects only estimated rows parameter, not join method (unlike cardinality in Oracle)
The following investigations showed that costs of different method of join are defined by estimeted rows number of joined tables, not estimeted rows number of join result (see initial_cost_nestloop, final_cost_nestloop, initial_cost_mergejoin, final_cost_mergejoin, initial_cost_hashjoin, final_cost_hashjoin in src/backend/optimizer/path/costsize.c )