Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 2.61 KB

README.MD

File metadata and controls

37 lines (29 loc) · 2.61 KB

Introduction

PARQO (Penalty-Aware Robust Plan Selection in Query Optimization) is a novel system to select robust and performant plans in the RQO (Robust Query Optimization) problem, while also enhancing the efficiency and effectiveness of the PQO (Parametric Query Optimization) problem. Based on 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. For more technical details, see our VLDB 2024 paper.

Run PARQO

  1. Download PostgreSQL 16.2 and follow the steps here to config Postgres (16.2) or injecting cardinality and query plans into the optimizer.

  2. Install pg_hint_plan (the version that working with PostgreSQL 16).

  3. Use pg_ctl to initdb and modify the postgresql.conf file. Our conf file is present here, you can directly copy paste this file to your database directory generated by Postgres initdb.

  4. Make database (JOB, DSB and STATS)

  • JOB: please follow Balsa to download and load data to your database
  • DSB: please follow dsb-linux-pg to generate data and workload
  • STATS: please follow CardEst to download data and load data to your database
  1. Run PARQO's code:
  • In your environment, install numpy, psycopg2, matplotlib, scikit-learn, SALib, tqdm
  • For RQO task: python robustness.py --query_id=17a
  • For PQO task: python robustness.py --query_id=17a --pqo
  • Others:
    • Sobols: python robustness.py --query_id=17a --cal_sen=sobols
    • Morris: python robustness.py --query_id=17a --cal_sen=morris

Cite PARQO and Enhance Its Impact

We welcome all forms of discussion and collaboration for future research and are eager to help with plan selection in your project. If you find our paper or repository valuable, please consider citing our work:

@article{xiu2024parqo,
      title={{PARQO}: Penalty-Aware Robust Plan Selection in Query Optimization}, 
      author={Haibo Xiu and Pankaj K. Agarwal and Jun Yang},
      year={2024},
      journal={Proceedings of the VLDB Endowment},
      volume={17},
      number={13},
}