Re-enable MIN/MAX optimization.
I'm not sure why it's been disabled. It's not very hard to make it work, so let's do it. Might not be a very common query type, but if you happen to have a query where it helps, it helps a lot. This adds a GUC, gp_enable_minmax_optimization, to enable/disable the optimization. There's no such GUC in upstream, but we need at least a flag in PlannerConfig for it, so that we can disable the optimization for correlated subqueries, along with some other optimizer tricks. Seems best to also have a GUC for it, for consistency with other flags in PlannerConfig.
Showing
想要评论请 注册 或 登录