mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-11 07:42:54 +00:00
* feat: refine logs for scan * feat: improve build parts and unordered scan metrics * feat: change to debug log * fix: release lock before reading part * test: replace region id * test: fix sqlness * chore: add todo Co-authored-by: dennis zhuang <killme2008@gmail.com> --------- Co-authored-by: dennis zhuang <killme2008@gmail.com>
27 lines
755 B
SQL
27 lines
755 B
SQL
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 REPLACE (metrics.*) REDACTED
|
|
-- SQLNESS REPLACE (RoundRobinBatch.*) REDACTED
|
|
-- SQLNESS REPLACE (-+) -
|
|
-- SQLNESS REPLACE (\s\s+) _
|
|
-- SQLNESS REPLACE (peers.*) REDACTED
|
|
-- SQLNESS REPLACE region=\d+\(\d+,\s+\d+\) region=REDACTED
|
|
explain analyze SELECT count(*) FROM system_metrics;
|
|
|
|
drop table system_metrics;
|