ClickHouse/tests/queries/1_stateful/00180_read_from_cache.sh
Nikita Taranov 036af7f103 add test
2023-11-03 15:14:37 +01:00

21 lines
803 B
Bash
Executable File

#!/usr/bin/env bash
# Tags: no-parallel, no-random-settings
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
# Warm up the cache
$CLICKHOUSE_CLIENT -q "SELECT * FROM test.hits_s3 WHERE URL LIKE '%google%' ORDER BY EventTime LIMIT 10 FORMAT Null"
$CLICKHOUSE_CLIENT -q "SELECT * FROM test.hits_s3 WHERE URL LIKE '%google%' ORDER BY EventTime LIMIT 10 FORMAT Null"
query_id=02906_read_from_cache_$RANDOM
$CLICKHOUSE_CLIENT --query_id ${query_id} -q "SELECT * FROM test.hits_s3 WHERE URL LIKE '%google%' ORDER BY EventTime LIMIT 10 FORMAT Null"
$CLICKHOUSE_CLIENT -nq "
SYSTEM FLUSH LOGS;
SELECT ProfileEvents['AsynchronousReaderIgnoredBytes'] FROM system.query_log WHERE query_id = '$query_id' AND type = 'QueryFinish'
"