Hi,
I am learning ditributed SQL optimization techniques. I read cockroachdb RFC [1] about it and cannot realize one thing. From the document I understood that a cost-based optimizer (CBO) works during logical query planning ignoring all information about data distribution on nodes in a cluser. After logical planning it produces only one optimized logical plan. Next, the logical plan is transformed to a physical plan. I cannot fully understand why an optimal logical plan always leads to an optimal physical plan. Is it so? Why is it so? Or did I get how the optimizer works wrong?
[1] https://github.com/cockroachdb/cockroach/blob/master/docs/RFCS/20160421_distributed_sql.md