mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
23 lines
501 B
Bash
Executable File
23 lines
501 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Install
|
|
|
|
curl https://clickhouse.com/ | sh
|
|
sudo DEBIAN_FRONTEND=noninteractive ./clickhouse install
|
|
sudo clickhouse start
|
|
|
|
# Load the data
|
|
|
|
clickhouse-client < create.sql
|
|
|
|
wget --continue 'https://datasets.clickhouse.com/hits_compatible/hits.tsv.gz'
|
|
gzip -d hits.tsv.gz
|
|
|
|
clickhouse-client --time --query "INSERT INTO hits FORMAT TSV" < hits.tsv
|
|
|
|
# Run the queries
|
|
|
|
./run.sh
|
|
|
|
clickhouse-client --query "SELECT total_bytes FROM system.tables WHERE name = 'hits' AND database = 'default'"
|