mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 02:12:21 +00:00
Merge pull request #72657 from xavierleune/fix/docs-replication
(docs) Fix examples for replication
This commit is contained in:
commit
348b7393a5
@ -177,7 +177,7 @@ CREATE TABLE table_name
|
|||||||
CounterID UInt32,
|
CounterID UInt32,
|
||||||
UserID UInt32,
|
UserID UInt32,
|
||||||
ver UInt16
|
ver UInt16
|
||||||
) ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/table_name', '{replica}', ver)
|
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{layer}-{shard}/table_name', '{replica}', ver)
|
||||||
PARTITION BY toYYYYMM(EventDate)
|
PARTITION BY toYYYYMM(EventDate)
|
||||||
ORDER BY (CounterID, EventDate, intHash32(UserID))
|
ORDER BY (CounterID, EventDate, intHash32(UserID))
|
||||||
SAMPLE BY intHash32(UserID);
|
SAMPLE BY intHash32(UserID);
|
||||||
|
@ -175,7 +175,7 @@ CREATE TABLE table_name
|
|||||||
CounterID UInt32,
|
CounterID UInt32,
|
||||||
UserID UInt32,
|
UserID UInt32,
|
||||||
ver UInt16
|
ver UInt16
|
||||||
) ENGINE = ReplicatedMergeTree('/clickhouse/tables/{shard}/table_name', '{replica}', ver)
|
) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{layer}-{shard}/table_name', '{replica}', ver)
|
||||||
PARTITION BY toYYYYMM(EventDate)
|
PARTITION BY toYYYYMM(EventDate)
|
||||||
ORDER BY (CounterID, EventDate, intHash32(UserID))
|
ORDER BY (CounterID, EventDate, intHash32(UserID))
|
||||||
SAMPLE BY intHash32(UserID);
|
SAMPLE BY intHash32(UserID);
|
||||||
|
Loading…
Reference in New Issue
Block a user