The TPC-H Benchmark Tool is not included for licensing reasons. You have to download the tool from http://tpc.org yourself and extract it to ./tools/dbgen
.
docker built -t mysql-indexing-tutorial .
Start container:
docker-compose up
Start interactive shell for just created container
docker exec -ti `docker ps -ql`
/tools/bin/generate_data.sh
$ mysql -uroot -p tpch
Create schema and import generated data
mysql> source /tools/dbgen/dss.dll
mysql> source /sql/load_data.sql
Enable profiling for detailed performance figures (optional)
SET PROFILING=1;
SHOW PROFILES;
SHOW PROFILE FOR QUERY <n>;
SET PROFILING_HISTORY_SIZE=0;
SET PROFILING_HISTORY_SIZE=1;
Run test query
source /sql/demo_query.sql
Create index
source /sql/create_index.sql
Run test query again
source /sql/demo_query.sql