Skip to content

Commit df88019

Browse files
Improvements
1 parent 8f485ba commit df88019

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

clickhouse/benchmark.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
# Install
44

5-
curl https://clickhouse.com/ | sh
6-
sudo ./clickhouse install --noninteractive
5+
if [ ! -x /usr/bin/clickhouse ]
6+
then
7+
curl https://clickhouse.com/ | sh
8+
sudo ./clickhouse install --noninteractive
9+
fi
710

811
# Optional: if you want to use higher compression:
912
if (( 0 )); then
@@ -35,8 +38,11 @@ fi
3538

3639
clickhouse-client < create"$SUFFIX".sql
3740

38-
wget --no-verbose --continue 'https://datasets.clickhouse.com/hits_compatible/hits.tsv.gz'
39-
gzip -d hits.tsv.gz
41+
if [ ! -f hits.tsv ]
42+
then
43+
wget --no-verbose --continue 'https://datasets.clickhouse.com/hits_compatible/hits.tsv.gz'
44+
gzip -d hits.tsv.gz
45+
fi
4046

4147
clickhouse-client --time --query "INSERT INTO hits FORMAT TSV" < hits.tsv
4248

0 commit comments

Comments
 (0)