This repository contains the code and resources for PAR2QO, a system for Parametric Penalty-Aware Robust Query Optimization. PAR2QO integrates robust plan selection into Parametric Query Optimization (PQO) to enhance both efficiency and stability. The full version paper is: par2qo.pdf
-
Download PostgreSQL 16.2 and follow the steps here to config Postgres (16.2) which can inject cardinality and query plans into the optimizer.
-
Install pg_hint_plan (the version that works with PostgreSQL 16).
-
Use pg_ctl to initdb and modify the postgresql.conf file. Our conf file is present here, you can directly copy and paste this file to your database directory generated by Postgres
initdb. -
Make databases (JOB and DSB)
- JOB: please follow Balsa to download and load data to your database
- DSB: please follow dsb-linux-pg to generate data and workload
- Open
par2qo_run.pyand adjust the file configurations as needed. - Run PAR2QO with:
python par2qo_run.py