2019-02-20 09:22:13 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
|
|
. $CURDIR/../shell_config.sh
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
echo 'DROP TABLE IF EXISTS table_for_insert' | ${CLICKHOUSE_CURL} -sSg ${CLICKHOUSE_URL} -d @-
|
|
|
|
echo 'CREATE TABLE table_for_insert (a UInt8, b UInt8) ENGINE = Memory' | ${CLICKHOUSE_CURL} -sSg ${CLICKHOUSE_URL} -d @-
|
2019-07-20 00:28:48 +00:00
|
|
|
echo "INSERT INTO table_for_insert VALUES `printf '%*s' "1000000" | sed 's/ /(1, 2)/g'`" | ${CLICKHOUSE_CURL_COMMAND} --max-time 30 -sSg ${CLICKHOUSE_URL} -d @-
|
2019-04-16 14:13:13 +00:00
|
|
|
echo 'SELECT count(*) FROM table_for_insert' | ${CLICKHOUSE_CURL} -sSg ${CLICKHOUSE_URL} -d @-
|
|
|
|
echo 'DROP TABLE IF EXISTS table_for_insert' | ${CLICKHOUSE_CURL} -sSg ${CLICKHOUSE_URL} -d @-
|