ClickHouse/benchmark/compatible/mysql/benchmark.sh

22 lines
516 B
Bash
Raw Normal View History

2022-06-26 04:00:07 +00:00
#!/bin/bash
# Install
sudo apt-get update
sudo apt-get install mysql-server-8.0
sudo bash -c "echo -e '[mysql]\nlocal-infile=1\n\n[mysqld]\nlocal-infile=1\n' > /etc/mysql/conf.d/local_infile.cnf"
sudo service mysql restart
# Load the data
wget 'https://datasets.clickhouse.com/hits_compatible/hits.tsv.gz'
gzip -d hits.tsv.gz
sudo mysql -e "CREATE DATABASE test"
sudo mysql test < create.sql
time sudo mysql test -e "LOAD DATA LOCAL INFILE 'hits.tsv' INTO TABLE hits"
# 2:37:52 elapsed
./run.sh | tee log.txt