发布于 6 个月前 作者 clickhousesss 635 次浏览 来自 问答

为什么我创建不生效,谁试过??? Distributed DDL queries (ON CLUSTER clause) The CREATE, DROP, ALTER, and RENAME queries support distributed execution on a cluster. For example, the following query creates the all_hits Distributed table on each host in cluster: CREATE TABLE IF NOT EXISTS all_hits ON CLUSTER cluster (p Date, i Int32) ENGINE = Distributed(cluster, default, hits)

2 回复


@wangxin 就是一个分片上建表,其他分片也会自动创建表,不用一台一台创建