  The effectiveness of a query optimizer relies on the accuracy of selectivity
estimates. The execution plan generated by the optimizer can be extremely poor
in reality due to uncertainty in these estimates. This paper presents PARQO
(Penalty-Aware Robust Plan Selection in Query Optimization), a novel system
where users can define powerful robustness metrics that assess the expected
penalty of a plan with respect to true optimal plans under uncertain
selectivity estimates. PARQO uses workload-informed profiling to build error
models, and employs principled sensitivity analysis techniques to identify
human-interpretable selectivity dimensions with the largest impact on penalty.
Experiments on three benchmarks demonstrate that PARQO finds robust, performant
plans, and enables efficient and effective parametric optimization.
