DACE: A Database-Agnostic Cost Estimator.
- Python 3.9.18
- Required Python packages (see
requirements.txt)
Clone the repository and install the dependencies:
git clone git@github.com:liang-zibo/DACE.git
cd dace
pip install -r requirements.txtBefore running the code, please download the data from this data repository and put them in the data folder.
Modify ROOT_DIR in utils.py to your own path.
To filter out plans and gather statistical data, run:
python setup.py --filter_plans --get_statisticTo get plan encodings, run:
python run.py --process_plansTo sequentially use each database as a test set while treating the remaining databases as a training set, execute:
python run.py --test_allTo test and evaluate DACE's performance on the IMDB dataset (dataset ID: 13), without including any knowledge from the IMDB dataset in the training set, use:
python run.py --test_database_ids 13
cd data
mv DACE.ckpt DACE_imdb.ckptTo directly test DACE as a pre-trained estimator on job-light, scale, and synthetic workloads:
python run_tuning.pyFor fine-tuning and testing DACE as a pre-trained estimator on job-light, scale, and synthetic workloads:
python run_tuning.py --tuneIf you have any questions about the code, please email zibo_liang@outlook.com