timescaledb_toolkit
timescaledb_toolkit : Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 1010 | timescaledb_toolkit | timescaledb_toolkit | 1.23.0 |
TIME | Timescale | Rust |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-- | No | Yes | No | Yes | no | no |
| Relationships | |
|---|---|
| See Also | timescaledb timeseries pg_stl first_last_agg extra_window_functions quantile tdigest topn tablefunc |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.23.0 |
18 17 16 15 14 | timescaledb_toolkit |
- |
| RPM | PIGSTY | 1.23.0 |
18 17 16 15 14 | timescaledb-toolkit_$v |
- |
| DEB | PIGSTY | 1.23.0 |
18 17 16 15 14 | postgresql-$v-timescaledb-toolkit |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | N/A |
| el8.aarch64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | N/A |
| el9.x86_64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | N/A |
| el9.aarch64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | N/A |
| el10.x86_64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | N/A |
| el10.aarch64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | N/A |
| d12.x86_64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.19.0 |
| d12.aarch64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.19.0 |
| d13.x86_64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | N/A |
| d13.aarch64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | N/A |
| u22.x86_64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.19.0 |
| u22.aarch64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.19.0 |
| u24.x86_64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.19.0 |
| u24.aarch64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.19.0 |
| u26.x86_64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | N/A |
| u26.aarch64 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | PIGSTY 1.23.0 | N/A |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
postgresql-14-timescaledb-toolkit |
1.19.0 |
d12.x86_64 | pigsty | 2.7 MiB | postgresql-14-timescaledb-toolkit_1.19.0-1PIGSTY~bookworm_amd64.deb |
postgresql-14-timescaledb-toolkit |
1.19.0 |
d12.aarch64 | pigsty | 2.3 MiB | postgresql-14-timescaledb-toolkit_1.19.0-1PIGSTY~bookworm_arm64.deb |
postgresql-14-timescaledb-toolkit |
1.19.0 |
u22.x86_64 | pigsty | 3.0 MiB | postgresql-14-timescaledb-toolkit_1.19.0-1PIGSTY~jammy_amd64.deb |
postgresql-14-timescaledb-toolkit |
1.19.0 |
u22.aarch64 | pigsty | 2.7 MiB | postgresql-14-timescaledb-toolkit_1.19.0-1PIGSTY~jammy_arm64.deb |
postgresql-14-timescaledb-toolkit |
1.19.0 |
u24.x86_64 | pigsty | 2.9 MiB | postgresql-14-timescaledb-toolkit_1.19.0-1PIGSTY~noble_amd64.deb |
postgresql-14-timescaledb-toolkit |
1.19.0 |
u24.aarch64 | pigsty | 2.7 MiB | postgresql-14-timescaledb-toolkit_1.19.0-1PIGSTY~noble_arm64.deb |
Source
github.com/timescale/timescaledb-toolkit
timescaledb-toolkit-1.23.0.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources: documentation index, v1.23.0 release, Changelog
TimescaleDB Toolkit provides specialized functions for time-series analytics using a two-step aggregation pattern. Most functions create intermediate representations that accessor functions then query, enabling efficient reuse and multiple analyses.
Approximate Analytics
HyperLogLog - Distinct Count Estimation
Probabilistic distinct counting with configurable precision for high-cardinality datasets.
T-Digest - Quantile Approximation
High-accuracy percentile estimation optimized for tail quantiles (P95, P99).
UddSketch - Bounded Error Quantiles
Quantile estimation with guaranteed maximum relative error bounds.
Counter Analytics
Counter Aggregates - Monotonic Metrics
Handle counters that increase monotonically with automatic reset detection.
Gauge Aggregates - Varying Metrics
Analytics for metrics that vary up and down (temperature, memory usage).
Time-Weighted Analytics
Time-Weighted Averages
Handle irregularly sampled data with interpolation methods (LOCF, Linear).
Data Visualization
LTTB Downsampling
Downsample time series while preserving visual similarity for charts.
ASAP Smoothing
Generate human-readable graphs by reducing noise while preserving trends.
Statistical Analysis
Stats Aggregates
Comprehensive statistical analysis with 1D and 2D regression capabilities.
Timevector Data Type
Efficient intermediate representation for time series operations.
Integration Patterns
Continuous Aggregation Support
Most toolkit functions work seamlessly with TimescaleDB continuous aggregates:
Two-Step Analysis Pattern
Store intermediate aggregates for multiple analyses:
All functions in the experimental schema (toolkit_experimental) may change between versions. Use stable functions for production workloads requiring API stability.
Version Notes
timescaledb_toolkit 1.23.0 has two behavior changes to account for in tests: max_n, max_n_by, min_n, and min_n_by return an empty result instead of raising on empty streams, and 1D aggregations now error on values that would lose 53-bit precision instead of silently returning wrong data. The release also marks time_weight and its rollup parallel-unsafe, updates to pgrx 0.18, and fixes ASAP smoothing sortedness checks.