如何从influxdb中删除数据?
文档显示这应该很简单:
delete from foo where time < now() -1h
由于某种原因,influxdb拒绝我的删除语句,并显示“删除查询不能有不引用时间的where子句”。
select * from bootstrap where duration > 1000 and time > 14041409940s and time < now()
我想删除那些持续时间大于1000秒的5个条目![enter image description here](https://istack.dev59.com/lYW5u.webp)
这应该是一个有效的SQL语句,但它失败了。
这些删除语句都不起作用
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;
可能这是一个 bug?
https://github.com/influxdb/influxdb/issues/975
https://github.com/influxdb/influxdb/issues/84