Hi, Currently flink already uses cost-based optimizer, but due to the reason we didn’t have accurate statistics and the simple cost model, we actually don't gain much from this framework. I proposed some improvements in the following document and some rough implementation plan: https://docs.google.com/document/d/1X7pEWHmuVywbJ8xFtiUY8Cpyw5A1u-4c4tKeODp-W-0/
Hope to hear some feedbacks from you. best, Kurt