Timescale hyperfunctions are a specialized set of functions that allow you to analyze time-series data. You can use hyperfunctions to analyze anything you have stored as time-series data, including IoT devices, IT systems, marketing analytics, user behavior, financial metrics, and cryptocurrency.

Some hyperfunctions are included by default in Timescale. For additional hyperfunctions, you need to install the Timescale Toolkit PostgreSQL extension.

For more information, see the hyperfunctions documentation.

Approximate count distinct functions

Hyperfunction typeHyperfunction nameToolkitExperimental
hyperloglog() functions
Aggregatehyperloglog()
Alternate aggregateapprox_count_distinct()
Accessordistinct_count()
stderror()
Rolluprollup()

Counters and gauges functions

Downsampling functions

Hyperfunction typeHyperfunction nameToolkitExperimental
Functionasap_smooth()
gp_lttb()
lttb()

Financial analysis functions

Hyperfunction typeHyperfunction nameToolkitExperimental
candlestick_agg() functions
Aggregatecandlestick_agg()
Pseudo aggregatecandlestick()
Accessorclose()
close_time()
high()
high_time()
low()
low_time()
open()
open_time()
volume()
vwap()
Rolluprollup()

Frequency analysis functions

Hyperfunction typeHyperfunction nameToolkitExperimental
count_min_sketch() functions
Aggregatecount_min_sketch()
Accessorapprox_count()
freq_agg() functions
Aggregatefreq_agg()
Accessorinto_values()
max_frequency()
min_frequency()
topn()
Alternate aggregatemcv_agg()
Rolluprollup()

Gapfilling functions

Hyperfunction typeHyperfunction nameToolkitExperimental
Buckettime_bucket_gapfill()
Interpolatorinterpolate()
locf()

Minimum and maximum functions

Hyperfunction typeHyperfunction nameToolkitExperimental
max_n() functions
Aggregatemax_n()
Accessorinto_array()
into_values()
Rolluprollup()
max_n_by() functions
Aggregatemax_n_by()
Accessorinto_values()
Rolluprollup()
min_n() functions
Aggregatemin_n()
Accessorinto_array()
into_values()
Rolluprollup()
min_n_by() functions
Aggregatemin_n_by()
Accessorinto_values()
Rolluprollup()

Percentile approximation functions

Hyperfunction typeHyperfunction nameToolkitExperimental
tdigest() functions
Aggregatetdigest()
Accessorapprox_percentile()
approx_percentile_rank()
mean()
num_vals()
Rolluprollup()
uddsketch() functions
Aggregateuddsketch()
Accessorapprox_percentile()
approx_percentile_array()
approx_percentile_rank()
error()
mean()
num_vals()
Alternate aggregatepercentile_agg()
Rolluprollup()

Saturating math functions

Hyperfunction typeHyperfunction nameToolkitExperimental
Functionsaturating_add()
saturating_add_pos()
saturating_mul()
saturating_sub()
saturating_sub_pos()

State tracking functions

Hyperfunction typeHyperfunction nameToolkitExperimental
compact_state_agg() functions
Aggregatecompact_state_agg()
Accessorduration_in()
interpolated_duration_in()
into_values()
Rolluprollup()
heartbeat_agg() functions
Aggregateheartbeat_agg()
Accessordead_ranges()
downtime()
interpolate()
interpolated_downtime()
interpolated_uptime()
live_at()
live_ranges()
num_gaps()
num_live_ranges()
trim_to()
uptime()
Rolluprollup()
state_agg() functions
Aggregatestate_agg()
Accessorduration_in()
interpolated_duration_in()
interpolated_state_periods()
interpolated_state_timeline()
into_values()
state_at()
state_periods()
state_timeline()
Rolluprollup()

Statistical and regression analysis functions

Hyperfunction typeHyperfunction nameToolkitExperimental
stats_agg() (one variable) functions
Aggregatestats_agg() (one variable)
Accessoraverage()
kurtosis()
num_vals()
skewness()
stddev()
sum()
variance()
Rolluprolling()
rollup()
stats_agg() (two variables) functions
Aggregatestats_agg() (two variables)
Accessoraverage_y(), average_x()
corr()
covariance()
determination_coeff()
intercept()
kurtosis_y(), kurtosis_x()
num_vals()
skewness_y(), skewness_x()
slope()
stddev_y(), stddev_x()
sum_y(), sum_x()
variance_y(), variance_x()
x_intercept()
Rolluprolling()
rollup()

Time weighted calculations functions

Hyperfunction typeHyperfunction nameToolkitExperimental
time_weight() functions
Aggregatetime_weight()
Accessoraverage()
first_time()
first_val()
integral()
interpolated_average()
interpolated_integral()
last_time()
last_val()
Rolluprollup()

General functions

Hyperfunction typeHyperfunction nameToolkitExperimental
Buckettime_bucket()
timescaledb_experimental.time_bucket_ng()
One step aggregateapproximate_row_count()
first()
histogram()
last()
One step operationdays_in_month()
month_normalize()

Keywords

Found an issue on this page?

Report an issue!