mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-01 20:12:02 +00:00
22 lines
516 B
Bash
22 lines
516 B
Bash
|
#!/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
|