mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-10 07:12:54 +00:00
* feat: simple version switch * chore: remove debug print * chore: add common folder * tests: add drop table * feat: pull versioned binary * chore: don't use native-tls * chore: rm outdated docs * chore: new line * fix: save old bin dir * fix: switch version restart all node * feat: use etcd * fix: wait for election * fix: normal sqlness * refactor: hashmap for bin dir * test: past 3 major version compat crate table * refactor: allow using without setup etcd
23 lines
555 B
SQL
23 lines
555 B
SQL
-- SQLNESS ARG version=v0.9.5
|
|
CREATE TABLE system_metrics (
|
|
host STRING,
|
|
idc STRING,
|
|
cpu_util DOUBLE,
|
|
memory_util DOUBLE,
|
|
disk_util DOUBLE,
|
|
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(),
|
|
PRIMARY KEY(host, idc),
|
|
TIME INDEX(ts)
|
|
);
|
|
|
|
INSERT INTO system_metrics
|
|
VALUES
|
|
("host1", "idc_a", 11.8, 10.3, 10.3, 1667446797450),
|
|
("host2", "idc_a", 80.0, 70.3, 90.0, 1667446797450),
|
|
("host1", "idc_b", 50.0, 66.7, 40.6, 1667446797450);
|
|
|
|
-- SQLNESS ARG version=latest
|
|
SHOW CREATE TABLE system_metrics;
|
|
|
|
DROP TABLE system_metrics;
|