gpt4 book ai didi

sql - 可以从 influxdb 中删除数据吗?

转载 作者:行者123 更新时间:2023-12-03 06:22:32 27 4
gpt4 key购买 nike

如何从 influxdb 中删除数据?

文档显示它应该简单如下:

delete from foo where time < now() -1h

出于某种原因,influxdb 拒绝我的删除语句,并表示“删除查询不能包含不引用时间的 where 子句”

select * from bootstrap where duration > 1000 and time > 14041409940s and time < now()

我想删除这 5 个持续时间 > 1000 秒的条目 enter image description here

这应该是一个有效的sql语句,但它失败了

enter image description here

这些删除语句都不起作用

delete from bootstrap where duration > 3000000"

delete from bootstrap where duration > 300000"

delete from bootstrap where time = 1404140994043"

delete from bootstrap where duration > 300000 and time > 1404141054508 "

delete from bootstrap where duration > 300000 and time > 1404141054508s "

delete from bootstrap where time > 1404141054508s and duration > 300000 "

delete from bootstrap where duration > 30000 and time > 1s"

文档引用

https://docs.influxdata.com/influxdb/v2.0/query-data/influxql/

更新

其他查询

delete from bootstrap where time > 1404141416824 and duration > 3000;
delete sequence_number from bootstrap where time > 1s and duration > 1000;

也许这是一个错误?

https://github.com/influxdb/influxdb/issues/975
https://github.com/influxdb/influxdb/issues/84

最佳答案

看来您可以在 influxdb 0.9 中执行此操作。例如,这是我刚刚成功的查询:

DROP SERIES FROM temperature WHERE machine='zagbar'

(根据 @MuratCorlu 的慷慨评论,我将重新发布我之前的评论作为答案......)

关于sql - 可以从 influxdb 中删除数据吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26268544/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com