ClickHouse/dbms/tests/queries/0_stateless/00980_skip_unused_shards_without_sharding_key.sql

13 lines
361 B
SQL

DROP TABLE IF EXISTS t_local;
DROP TABLE IF EXISTS t_distr;
CREATE TABLE t_local (a Int) ENGINE = Memory;
CREATE TABLE t_distr (a Int) ENGINE = Distributed(test_shard_localhost, currentDatabase(), 't_local');
INSERT INTO t_local VALUES (1), (2);
SET optimize_skip_unused_shards = 1;
SELECT * FROM t_distr WHERE a = 1;
DROP table t_local;
DROP table t_distr;