英文:
How can Apache IoTDB query discontinuous data and to only keep one copy of duplicated data?
问题
我想知道Apache IoTDB是否可以直接查询在某个时间段内的不连续数据,即如果数据重复,只保留一份副本?现在我需要一次查询30,000个时间序列,但现在查询它们并在一页上显示它们太慢了。我们的要求是,如果时间序列数据的三个字段相同,将视为重复记录,在页面呈现时不显示它们。我目前使用的是IoTDB的0.13版本,是否有我可以使用的功能?
英文:
I wonder if Apache IoTDB can directly query discontinuous data within a certain period of time, that is, to keep only one copy if the data is duplicated? Now I need to query 30,000 time series at one time, and right know it is too slow to query them all and present them on one page. Our requirement is that if three fields of time series data are the same, it will be considered a duplicate record, and it can not be displayed when the page is rendered. I currently use Version 0.13 of IoTDB, are there any function that I can use?
答案1
得分: 0
你可以在Apache IoTDB中使用跳跃函数。如果需要判断这三个字段是否相同,可以编写如下命令:select s1 from root.sg.d1 where diff(s1) != 0 or diff(s2) != 0 or diff(s3) != 0
。然而,这个函数只能在版本1.1.0之后执行,所以你可能需要升级IoTDB版本。
英文:
You can use jump function in Apache IoTDB. If you need to judge whether the three fields are the same, you can write the command like select s1 from root.sg.d1 where diff(s1) != 0 or diff(s2) != 0 or diff(s3) != 0
. However, this function can only be executed after Version 1.1.0, so you may need to upgrade IoTDB version.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论