The Greenplum Database parallel query optimizer (Figure 6) is responsible for converting SQL or MapReduce into a physical execution plan. It does this by using a cost-based optimization algorithm to evaluate a vast number of potential plans and select the one that it believes will lead to the most efficient query execution. Unlike a traditional query optimizer, Greenplum’s optimizer takes a global view of execution across the cluster, and factors in the cost of moving data between nodes in any candidate plan. The benefit of this “global” query planning approach is that it can use global knowledge and statistical estimates.