greptimedb
greptimedb copied to clipboard
Using nanosecond precision in the PromQL HTTP API
What type of enhancement is this?
API improvement
What does the enhancement do?
The documentation said:
The timestamp precision in PromQL is limited by its query syntax, only supporting calculations up to millisecond precision. However, GreptimeDB supports storing high-precision timestamps, such as microseconds and nanoseconds. When using PromQL for calculations, these high-precision timestamps are implicitly converted to millisecond precision.
Since GreptimeDB supports high-precision timestamps, it is better for the API endpoints to use nanosecond as the default precision to avoid loss of precision.
Implementation challenges
No response