mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-04 12:22:55 +00:00
39 lines
936 B
Plaintext
39 lines
936 B
Plaintext
CREATE TABLE IF NOT EXISTS `test_table` (
|
|
`bytes` BIGINT NULL,
|
|
`http_version` STRING NULL,
|
|
`ip` STRING NULL,
|
|
`method` STRING NULL,
|
|
`path` STRING NULL,
|
|
`status` SMALLINT UNSIGNED NULL,
|
|
`user` STRING NULL,
|
|
`timestamp` TIMESTAMP(3) NOT NULL,
|
|
TIME INDEX (`timestamp`),
|
|
PRIMARY KEY (`user`, `path`, `status`)
|
|
)
|
|
ENGINE=mito
|
|
WITH(
|
|
append_mode = 'true'
|
|
);
|
|
|
|
Affected Rows: 0
|
|
|
|
-- 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 test_table;
|
|
|
|
+-+-+-+
|
|
| stage | node | plan_|
|
|
+-+-+-+
|
|
| 0_| 0_|_MergeScanExec: REDACTED
|
|
|_|_|_|
|
|
| 1_| 0_|_ProjectionExec: expr=[0 as COUNT(test_table.timestamp)] REDACTED
|
|
|_|_|_common_recordbatch::adapter::MetricCollector REDACTED
|
|
|_|_|_|
|
|
|_|_| Total rows: 1_|
|
|
+-+-+-+
|
|
|