Skip to content

liang-zibo/DACE

Repository files navigation

DACE

Overview

DACE: A Database-Agnostic Cost Estimator.

Getting Started

Prerequisites

  • Python 3.9.18
  • Required Python packages (see requirements.txt)

Installation

Clone the repository and install the dependencies:

git clone [email protected]:liang-zibo/DACE.git
cd dace
pip install -r requirements.txt

Download DACE Data

Before running the code, please download the data from this data repository and put them in the data folder.

Usage

Modify ROOT_DIR

Modify ROOT_DIR in utils.py to your own path.

Filtering Plans and Gathering Statistics

To filter out plans and gather statistical data, run:

python setup.py --filter_plans --get_statistic

Get plan encodings

To get plan encodings, run:

python run.py --process_plans

Testing All Databases

To sequentially use each database as a test set while treating the remaining databases as a training set, execute:

python run.py --test_all

Testing on IMDB Dataset

To 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.ckpt

Direct Testing on Workloads

To directly test DACE as a pre-trained estimator on job-light, scale, and synthetic workloads:

python run_tuning.py

Tuning and Testing on Workloads

For fine-tuning and testing DACE as a pre-trained estimator on job-light, scale, and synthetic workloads:

python run_tuning.py --tune

Contact

If you have any questions about the code, please email [email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages