add DDL
This commit is contained in:
parent
4491da7a0f
commit
c4f9e94cca
1 changed files with 14 additions and 0 deletions
14
docs/CLICKHOUSE.md
Normal file
14
docs/CLICKHOUSE.md
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
# example create tabe DDL
|
||||||
|
|
||||||
|
CREATE TABLE default.watch_your_lan(
|
||||||
|
ts DateTime64(3, 'UTC'),
|
||||||
|
ip IPv4,
|
||||||
|
iface LowCardinality(String),
|
||||||
|
name LowCardinality(String),
|
||||||
|
mac FixedString(17),
|
||||||
|
known UInt8
|
||||||
|
)
|
||||||
|
ENGINE = MergeTree
|
||||||
|
PARTITION BY toYYYYMM(ts)
|
||||||
|
ORDER BY (ts, ip)
|
||||||
|
SETTINGS index_granularity = 8192;
|
||||||
Loading…
Reference in a new issue