You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, I am investigating on what is the best way to work with a couple of measurements of ever-increasing 64 bit counters from some networking devices sampled via SNMP. I was looking into the counter_agg function but I am not sure if It will work correctly for my use case, since the signature is:
counter_agg(ts TIMESTAMPTZ,value DOUBLE PRECISION[, bounds TSTZRANGE]) RETURNS CounterSummary
and since the counter are 64bits I need a numeric unsigned column that supports all possible counter values.
##### ¹ Note that the `value` is currently only accepted as a `DOUBLE PRECISION` number as most people use that for counters, even though other numeric types (ie `BIGINT`) might sometimes be more intuitive. If you store a value as a different numeric type you can cast to `DOUBLE PRECISION` on input to the function.
I says that I may cast to double precision, but if I did, wouldn't it be possible to loose precision if the counters get large enough?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there, I am investigating on what is the best way to work with a couple of measurements of ever-increasing 64 bit counters from some networking devices sampled via SNMP. I was looking into the counter_agg function but I am not sure if It will work correctly for my use case, since the signature is:
counter_agg(ts TIMESTAMPTZ,value DOUBLE PRECISION[, bounds TSTZRANGE]) RETURNS CounterSummaryand since the counter are 64bits I need a numeric unsigned column that supports all possible counter values.
from the docs:
timescaledb-toolkit/docs/counter_agg.md
Line 163 in 69278f1
I says that I may cast to double precision, but if I did, wouldn't it be possible to loose precision if the counters get large enough?
Beta Was this translation helpful? Give feedback.
All reactions