I am trying to use the following InfluxDB query with conditions on both time and field value, but it returns no results:
> select * from something where (time > 1 and time < 20000) or (def > 999)
However when I remove the last condition, my measurement is returned:
> select * from something where (time > 1 and time < 20000)
name: something
time abc def id
---- --- --- --
10000 444 555 123
Is this a bug in InfluxDB, or am I doing something wrong? I can't find anything in the documentation indicating that time and field conditions can't be combined... I've tried upgrading from 1.7 to 1.8.
To try this yourself:
$ influx
Connected to http://localhost:8086 version 1.8.0
InfluxDB shell version: 1.8.0
> drop database testdb
> create database testdb
> use testdb
Using database testdb
> insert something,id=123 abc=444i,def=555i 10000
> select * from something where (time > 1 and time < 20000) or (def > 999)