iotdb
iotdb copied to clipboard
跨设备查询时的时间排序问题
跨设备查询时的时间排序问题
现在iotdb 0.13.1 版本中时间跨设备查询时,进行时间排序,是先根据设备进行的排序,再根据时间进行的排序。
请问,如何实现在跨设备查询的时候依然先根据时间排序 ?
current align by device
sql does not support align by device first and then align by time.
But using the default query, you can get the result order by time. However, this kind of query is not friendly for cases which have many devices.
IoTDB> insert into root.sg1.d1(time, s1) values (1, 2);
Msg: The statement is executed successfully.
IoTDB> insert into root.sg1.d1(time, s1) values (5, 2);
Msg: The statement is executed successfully.
IoTDB> insert into root.sg1.d2(time, s1) values (3, 2);
Msg: The statement is executed successfully.
IoTDB> select * from root.**;
+-----------------------------+--------------+--------------+
| Time|root.sg1.d1.s1|root.sg1.d2.s1|
+-----------------------------+--------------+--------------+
|1970-01-01T08:00:00.001+08:00| 2.0| null|
|1970-01-01T08:00:00.003+08:00| null| 2.0|
|1970-01-01T08:00:00.005+08:00| 2.0| null|
+-----------------------------+--------------+--------------+
Total line number = 3
It costs 0.182s
IoTDB> select * from root.** align by device;
+-----------------------------+-----------+---+
| Time| Device| s1|
+-----------------------------+-----------+---+
|1970-01-01T08:00:00.001+08:00|root.sg1.d1|2.0|
|1970-01-01T08:00:00.005+08:00|root.sg1.d1|2.0|
|1970-01-01T08:00:00.003+08:00|root.sg1.d2|2.0|
+-----------------------------+-----------+---+
Total line number = 3
It costs 0.047s
dddd
@qiaojialin 乔老师,请问跨设备时间排序,优先时间排序,再设备排序的功能 有计划进行开发嘛 ?多谢
will consider this feature.
我这边也有同样的跨设备时间排序,优先时间排序需求,乔老师能在下个版本中增加这个功能吗?感谢
@qiaojialin 请问1.0版本 增加了这个 优先时间排序的功能了吗 ?