Hi all,
I’m trying to get a better understanding on the role of timestamp precision and how the storage engine takes advantage of this property, in order to better understand how to address certain concerns with my current project.
From what I got from the documentation, the HTTP API, unlike the CLI interface, allows you to explicitly specify a precision, for which it “recommend[s] using the least precise precision possible as this can result in significant improvements in compression.”
-
Why the verb “can”? What differentiates whether providing the precision improves the storage utilization efficiency? My intuition suggests me that it’s just a matter of using the same precision for a given measurement, but the documentation doesn’t state this precisely that and I haven’t read the code (yet).
-
Is precision considered only when it is passed explicitly, or is InfluxDB somehow able to infer that a given timestamp, despite being provided in nanoseconds, has actually a minute-level coarseness? The latter seems unlikely, intuitively it looks to me that it would be difficult to handle edge cases.
-
What happens if values are written with different precision levels to the same measurement? My understanding from the docs is that ultimately all information about write-time precision is lost, but I’d like to understand if and how this affects storage efficiency and read-time performance.
Thanks in advance!