mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-06 21:32:58 +00:00
* fix: use number of partitions as parallilism in region scanner Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * add sqlness Signed-off-by: Ruihang Xia <waynestxia@gmail.com> Co-authored-by: Lei HUANG <mrsatangel@gmail.com> * order by ts Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * debug pring time range Signed-off-by: Ruihang Xia <waynestxia@gmail.com> --------- Signed-off-by: Ruihang Xia <waynestxia@gmail.com> Co-authored-by: Lei HUANG <mrsatangel@gmail.com>
59 lines
1.0 KiB
SQL
59 lines
1.0 KiB
SQL
create table
|
|
t (
|
|
ts timestamp time index,
|
|
host string primary key,
|
|
not_pk string,
|
|
val double,
|
|
)
|
|
with
|
|
(
|
|
append_mode = 'true',
|
|
'compaction.type' = 'twcs',
|
|
'compaction.twcs.max_active_window_files' = '8',
|
|
'compaction.twcs.max_inactive_window_files' = '8'
|
|
);
|
|
|
|
insert into
|
|
t
|
|
values
|
|
(0, 'a', '🌕', 1.0),
|
|
(1, 'b', '🌖', 2.0),
|
|
(1, 'a', '🌗', 3.0),
|
|
(1, 'c', '🌘', 4.0),
|
|
(2, 'a', '🌑', 5.0),
|
|
(2, 'b', '🌒', 6.0),
|
|
(2, 'a', '🌓', 7.0),
|
|
(3, 'c', '🌔', 8.0),
|
|
(3, 'd', '🌕', 9.0);
|
|
|
|
admin flush_table ('t');
|
|
|
|
insert into
|
|
t
|
|
values
|
|
(10, 'a', '🌕', 1.0),
|
|
(11, 'b', '🌖', 2.0),
|
|
(11, 'a', '🌗', 3.0),
|
|
(11, 'c', '🌘', 4.0),
|
|
(12, 'a', '🌑', 5.0),
|
|
(12, 'b', '🌒', 6.0),
|
|
(12, 'a', '🌓', 7.0),
|
|
(13, 'c', '🌔', 8.0),
|
|
(13, 'd', '🌕', 9.0);
|
|
|
|
admin flush_table ('t');
|
|
|
|
select
|
|
count(ts)
|
|
from
|
|
t;
|
|
|
|
select
|
|
ts
|
|
from
|
|
t
|
|
order by
|
|
ts;
|
|
|
|
drop table t;
|