mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-24 08:50:40 +00:00
35 lines
2.1 KiB
Plaintext
35 lines
2.1 KiB
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 (peers.*) 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 |
|
|
+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|