Query tight timeslices

Hi,

First of all, i’m new to influx. So I’m not even sure is this right way to store this type of data.

I have a extensive logger from embedded platform. With configuration based eventIDs and fields. An Event can have up to 320 different fields (these being bits) or 10 4-byte integers and can fire somewhere between 10 to 100 milliseconds. Based on said configuration files the raw values are converted to fields and pushed to influx. My current data-rate is 14/15 event per second. As you can see from below logs from influxd, all of them looks like arriving.

[httpd] ::1 - ekeskin [28/Sep/2019:12:15:24 +0300] "POST /write?consistency=&db=PLCLogs&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBClient" 80b88934-e1d0-11e9-a41a-8c04ba23a5fb 1997
[httpd] ::1 - ekeskin [28/Sep/2019:12:15:24 +0300] "POST /write?consistency=&db=PLCLogs&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBClient" 80c47011-e1d0-11e9-a41b-8c04ba23a5fb 2002
[httpd] ::1 - ekeskin [28/Sep/2019:12:15:24 +0300] "POST /write?consistency=&db=PLCLogs&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBClient" 80ced049-e1d0-11e9-a41c-8c04ba23a5fb 1003
[httpd] ::1 - ekeskin [28/Sep/2019:12:15:24 +0300] "POST /write?consistency=&db=PLCLogs&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBClient" 80d8bb46-e1d0-11e9-a41d-8c04ba23a5fb 1001
[httpd] ::1 - ekeskin [28/Sep/2019:12:15:24 +0300] "POST /write?consistency=&db=PLCLogs&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBClient" 80e51bb5-e1d0-11e9-a41e-8c04ba23a5fb 2000
[httpd] ::1 - ekeskin [28/Sep/2019:12:15:24 +0300] "POST /write?consistency=&db=PLCLogs&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBClient" 80ef06e4-e1d0-11e9-a41f-8c04ba23a5fb 1998
[httpd] ::1 - ekeskin [28/Sep/2019:12:15:24 +0300] "POST /write?consistency=&db=PLCLogs&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBClient" 80f93fff-e1d0-11e9-a420-8c04ba23a5fb 1005
[httpd] ::1 - ekeskin [28/Sep/2019:12:15:24 +0300] "POST /write?consistency=&db=PLCLogs&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBClient" 810527e3-e1d0-11e9-a421-8c04ba23a5fb 1994
[httpd] ::1 - ekeskin [28/Sep/2019:12:15:24 +0300] "POST /write?consistency=&db=PLCLogs&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBClient" 810f87ca-e1d0-11e9-a422-8c04ba23a5fb 2002
[httpd] ::1 - ekeskin [28/Sep/2019:12:15:24 +0300] "POST /write?consistency=&db=PLCLogs&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBClient" 811977b8-e1d0-11e9-a423-8c04ba23a5fb 1875
[httpd] ::1 - ekeskin [28/Sep/2019:12:15:24 +0300] "POST /write?consistency=&db=PLCLogs&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBClient" 81238e10-e1d0-11e9-a424-8c04ba23a5fb 2000
[httpd] ::1 - ekeskin [28/Sep/2019:12:15:24 +0300] "POST /write?consistency=&db=PLCLogs&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBClient" 812f9c05-e1d0-11e9-a425-8c04ba23a5fb 2000
[httpd] ::1 - ekeskin [28/Sep/2019:12:15:24 +0300] "POST /write?consistency=&db=PLCLogs&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBClient" 81398715-e1d0-11e9-a426-8c04ba23a5fb 2001
[httpd] ::1 - ekeskin [28/Sep/2019:12:15:24 +0300] "POST /write?consistency=&db=PLCLogs&precision=ns&rp= HTTP/1.1" 204 0 "-" "InfluxDBClient" 814417e4-e1d0-11e9-a427-8c04ba23a5fb 2097

Basically what i have right now the following:

timestamp fields tags
timestamp in ns field1, field2, field3… fieldN eventid

And now i want to access this data in different layouts with different time-slices most of them being under second slices. Lets say I’m only interested in Events happened at “2019-09-28T09:15:24

When i query with the following query using relative times :

$ curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=PLCLogs" --data-urlencode "q=SELECT \"full value\" FROM \"06063-19\" WHERE time > now() - 53s and time < now() - 50s" 

I got following

"results": [
        {
            "statement_id": 0,
            "series": [
                {
                    "name": "06063-19",
                    "columns": [
                        "time",
                        "full value"
                    ],
                    "values": [
                        [
                            "2019-09-28T09:15:23.000470031Z",
                            1222999200
                        ],
                        [
                            "2019-09-28T09:15:23.000610033Z",
                            1226108112
                        ],
                        [
                            "2019-09-28T09:15:23.000890033Z",
                            1230588048
                        ],
                        [
                            "2019-09-28T09:15:24.000450034Z",
                            1222359296
                        ],
                        [
                            "2019-09-28T09:15:24.000590034Z",
                            1225788208
                        ],
                        [
                            "2019-09-28T09:15:25.000150035Z",
                            1209170624
                        ],
                        [
                            "2019-09-28T09:15:25.000430032Z",
                            1221719648
                        ]
                    ]
                }
            ]
        }
    ]

And with the following query using absolute times i still got the same results.

$ curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=PLCLogs" --data-urlencode "q=SELECT \"full value\" FROM \"06063-19\" WHERE time > '2019-09-28T09:15:24.000000000Z' and time < '2019-09-28T09:15:25.000000000Z'"

I got following

 "results": [
        {
            "statement_id": 0,
            "series": [
                {
                    "name": "06063-19",
                    "columns": [
                        "time",
                        "full value"
                    ],
                    "values": [
                        [
                            "2019-09-28T09:15:24.000450034Z",
                            1222359296
                        ],
                        [
                            "2019-09-28T09:15:24.000590034Z",
                            1225788208
                        ]
                    ]
                }
            ]
        }
    ]

Still it is 2 results influx is outputting despite I’m feeding it with 14/15 data points.

It is 2 in this example but the amount of data i get is changes, between 0 and 5/6.

Is this how influx works or should i specify some parameters etc. on my query to get full results instead of avaraged values etc.?

Also time differences between influxd log and results are Timezone differences. Since I’m on UTC+3.

Do both queries return inconsistent results?