ClickHouse/tests/queries/0_stateless/01304_direct_io.sh

20 lines
722 B
Bash
Raw Normal View History

2020-06-09 00:38:47 +00:00
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
2020-08-01 00:51:12 +00:00
. "$CURDIR"/../shell_config.sh
2020-06-09 00:38:47 +00:00
$CLICKHOUSE_CLIENT --multiquery --query "
DROP TABLE IF EXISTS bug;
CREATE TABLE bug (UserID UInt64, Date Date) ENGINE = MergeTree ORDER BY Date;
INSERT INTO bug SELECT rand64(), '2020-06-07' FROM numbers(50000000);
OPTIMIZE TABLE bug FINAL;"
2020-11-05 18:43:18 +00:00
$CLICKHOUSE_BENCHMARK --iterations 10 --max_threads 100 --min_bytes_to_use_direct_io 1 <<< "SELECT sum(UserID) FROM bug PREWHERE NOT ignore(Date)" 1>/dev/null 2>"$CLICKHOUSE_TMP"/err
cat "$CLICKHOUSE_TMP"/err | grep Exception
cat "$CLICKHOUSE_TMP"/err | grep Loaded
2020-06-09 00:38:47 +00:00
2020-12-07 08:35:44 +00:00
rm "$CLICKHOUSE_TMP"/err
2020-06-09 00:38:47 +00:00
$CLICKHOUSE_CLIENT --multiquery --query "
DROP TABLE bug;"