From f2f0468ae7056ad343f63148a79ebde955fa50f8 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 16 Jan 2024 15:50:25 +0200 Subject: [PATCH] docs/keyConcepts.md: clarify which values can be stored in VictoriaMetrics without precision loss This is a follow-up for 43d7de4afe758603a8d3c71a139f074176366fef Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5485 Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5503 --- docs/keyConcepts.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/keyConcepts.md b/docs/keyConcepts.md index 91cf7715a..f3658ec21 100644 --- a/docs/keyConcepts.md +++ b/docs/keyConcepts.md @@ -80,9 +80,11 @@ See [these docs](https://docs.victoriametrics.com/FAQ.html#what-is-high-cardinal #### Raw samples Every unique time series may consist of an arbitrary number of `(value, timestamp)` data points (aka `raw samples`) sorted by `timestamp`. -VictoriaMetrics stores all the `values` as [float64](https://en.wikipedia.org/wiki/Double-precision_floating-point_format) values +VictoriaMetrics stores all the `values` as [float64](https://en.wikipedia.org/wiki/Double-precision_floating-point_format) with [extra compression](https://faun.pub/victoriametrics-achieving-better-compression-for-time-series-data-than-gorilla-317bc1f95932) applied. -This guarantees precision correctness for values with up to 12 significant decimal digits ([-2^54 ... 2^54-1]). +This allows storing precise integer values with up to 12 decimal digits and any floating-point values with up to 12 significant decimal digits. +If the value has more than 12 significant decimal digits, then the less significant digits can be lost when storing them in VictoriaMetrics. + The `timestamp` is a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) with millisecond precision. Below is an example of a single raw sample