-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
159 additions
and
339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This tool loads the whole file in memory, which means it cannot run even a single query from ClickBench. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
The tool looks non-functional. | ||
|
||
Even the simplest query: | ||
``` | ||
dsq hits.parquet "SELECT count(*) FROM {}" | ||
``` | ||
leads to OOM. |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
# Install | ||
|
||
wget https://github.com/questdb/questdb/releases/download/8.1.2/questdb-8.1.2-rt-linux-x86-64.tar.gz | ||
wget https://github.com/questdb/questdb/releases/download/8.2.0/questdb-8.2.0-rt-linux-x86-64.tar.gz | ||
tar xf questdb*.tar.gz --one-top-level=questdb --strip-components 1 | ||
questdb/bin/questdb.sh start | ||
|
||
|
@@ -11,6 +11,7 @@ while ! nc -z localhost 9000; do | |
done | ||
|
||
sed -i 's/query.timeout.sec=60/query.timeout.sec=500/' ~/.questdb/conf/server.conf | ||
sed -i "s|cairo.sql.copy.root=import|cairo.sql.copy.root=$PWD|" ~/.questdb/conf/server.conf | ||
questdb/bin/questdb.sh stop | ||
questdb/bin/questdb.sh start | ||
|
||
|
@@ -19,8 +20,32 @@ questdb/bin/questdb.sh start | |
wget --no-verbose --continue 'https://datasets.clickhouse.com/hits_compatible/hits.csv.gz' | ||
gzip -d hits.csv.gz | ||
|
||
curl -G --data-urlencode "query=$(cat create.sql)" 'http://localhost:9000/exec?timings=true' | ||
time curl -F [email protected] 'http://localhost:9000/imp?name=hits' | ||
curl -G --data-urlencode "query=$(cat create.sql)" 'http://localhost:9000/exec' | ||
|
||
# SQL COPY works best on metal instances: | ||
curl -G --data-urlencode "query=copy hits from 'hits.csv' with timestamp 'EventTime' format 'yyyy-MM-dd HH:mm:ss';" 'http://localhost:9000/exec' | ||
|
||
echo 'waiting for import to finish...' | ||
until [ "$(curl -s -G --data-urlencode "query=select * from sys.text_import_log where phase is null and status='finished';" 'http://localhost:9000/exec' | grep -c '"count":1')" -ge 1 ]; do | ||
echo '.' | ||
sleep 5 | ||
done | ||
|
||
curl -s -G --data-urlencode "query=select datediff('s', start, finish) took_secs from (select min(ts) start, max(ts) finish from sys.text_import_log where phase is null);" 'http://localhost:9000/exec' | ||
|
||
# On smaller instances use this: | ||
# start=$(date +%s) | ||
|
||
# curl -F [email protected] 'http://localhost:9000/imp?name=hits' | ||
|
||
# echo 'waiting for rows to become readable...' | ||
# until [ "$(curl -s -G --data-urlencode "query=select 1 from (select count() c from hits) where c = 99997497;" 'http://localhost:9000/exec' | grep -c '"count":1')" -ge 1 ]; do | ||
# echo '.' | ||
# sleep 1 | ||
# done | ||
|
||
# end=$(date +%s) | ||
# echo "import took: $(($end-$start)) secs" | ||
|
||
# Run queries | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,4 +105,4 @@ CREATE TABLE hits | |
RefererHash long, | ||
URLHash long, | ||
CLID int | ||
); | ||
) TIMESTAMP(EventTime) PARTITION BY DAY; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.