mysql test --host 127.0.0.1 --port 4000 -u root < ~/tuner/tpch-queries/schema.sql
mysql test --local-infile=1 --host 127.0.0.1 --port 4000 -u root < ~/tuner/tpch-queries/load.sql
load_data.sh
python3 tuner.py test_file --singletest
to run a tuner on a single query. Note that:
- TiDB is running and schema used in the query exists in the database.
- database used is tuner_db. Modify it if it is different
- PORT is set to 4000 and modify it accordingly.
regression tests
python3 tuner.py <test-directory>
This just tests query markers (does it have joins, filters, ...) and test which rewrite are applicable
so far we have two regression tests: tpch_queries and sample_queries
Following modules needs to be installed for python
pip3 install mysql-connector-python
pip3 install openai
go build -o analyze.so -buildmode=c-shared analyze_sql.go