ClickHouse/benchmark/mariadb/benchmark.sh

22 lines
541 B
Bash
Raw Normal View History

2022-06-26 04:00:07 +00:00
#!/bin/bash
# Install
sudo apt-get update
2022-06-26 22:24:11 +00:00
sudo apt-get install -y mariadb-server
2022-06-26 04:00:07 +00:00
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 mariadb restart
# Load the data
2022-06-26 21:04:19 +00:00
wget --continue 'https://datasets.clickhouse.com/hits_compatible/hits.tsv.gz'
2022-06-26 04:00:07 +00:00
gzip -d hits.tsv.gz
2022-06-27 07:33:42 +00:00
sudo mariadb -e "CREATE DATABASE test"
sudo mariadb test < create.sql
time sudo mariadb test -e "LOAD DATA LOCAL INFILE 'hits.tsv' INTO TABLE hits"
2022-06-26 04:00:07 +00:00
# 2:23:45 elapsed
2022-06-26 05:31:49 +00:00
./run.sh 2>&1 | tee log.txt