mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-13 16:52:56 +00:00
* feat: impl show index and show columns * fix: show index from database * fix: canonicalize table name * refactor: show parsers
23 lines
465 B
SQL
23 lines
465 B
SQL
CREATE TABLE IF NOT EXISTS 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)
|
|
);
|
|
|
|
SHOW INDEX;
|
|
|
|
SHOW INDEX FROM system_metrics;
|
|
|
|
SHOW INDEX FROM system_metrics in public;
|
|
|
|
SHOW INDEX FROM system_metrics like '%util%';
|
|
|
|
SHOW INDEX FROM system_metrics WHERE Key_name = 'TIME INDEX';
|
|
|
|
DROP TABLE system_metrics;
|