Questions tagged [timescaledb]

An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension. QUESTIONS MUST BE ABOUT PROGRAMMING in order to be on-topic on Stack Overflow. Specifically, database administration is not on-topic for Stack Overflow.

TimescaleDB

TimescaleDB is an open-source database designed to make SQL scalable for time-series data. It is engineered up from PostgreSQL, providing automatic partitioning across time and space (partitioning key). It speaks full SQL and is correspondingly easy to use like a traditional relational database, yet scales in ways previously reserved for NoSQL databases.

Compared to the trade-offs demanded by these two alternatives (relational vs. NoSQL), TimescaleDB offers the best of both worlds for time-series data:

Features

Easy to Use

  • Full SQL interface for all SQL natively supported by PostgreSQL (including secondary indexes, non-time based aggregates, sub-queries, JOINs, window functions).
  • Connects to any client or tool that speaks PostgreSQL, no changes needed.
  • Time-oriented features, API functions, and optimizations.
  • Robust support for Data retention policies.

Scalable

  • Transparent time/space partitioning for both scaling up (single node) and scaling out (forthcoming).
  • High data write rates (including batched commits, in-memory indexes, transactional support, support for data backfill).
  • Right-sized chunks (two-dimensional data partitions) on single nodes to ensure fast ingest even at large data sizes.
  • Parallelized operations across chunks and servers.

Reliable

  • Engineered up from PostgreSQL, packaged as an extension.
  • Proven foundations benefiting from 20+ years of PostgreSQL research (including streaming replication, backups).
  • Flexible management options (compatible with existing PostgreSQL ecosystem and tooling).

Resources

691 questions
2
votes
0 answers

Query execution hanging in specific circumstances

The problem For a while now i've encountered a bug where a data retrieval query keeps hanging during execution. If that was all, then debugging would be fine, but it is not easy to reproduce, namely: It only occurs on my linux laptop (manjaro…
M.verdegaal
  • 362
  • 1
  • 4
  • 14
2
votes
0 answers

TimescaleDB very slow query after compression

I have got a hypertable (around 300 millions rows) with the following schema CREATE TABLE IF NOT EXISTS candlesticks( open_time TIMESTAMP NOT NULL, close_time TIMESTAMP NOT NULL, open DOUBLE PRECISION, high DOUBLE PRECISION, low DOUBLE…
Ler
  • 136
  • 1
  • 4
2
votes
2 answers

Get minimum price from last 30 days and the last price before that, quickly

I have below price audit table in timescale db. When I get new price I should calculate minimum price in last 30 days. But our price data not daily. In every price changes I write date and price to table. Problem is when I try to find the minimum…
2
votes
1 answer

Item update query produced by django is wrong

I am trying to update one item at a time using the Django ORM with TimescaleDB as my database. I have a timesacle hypertable defined by the following model: class RecordTimeSeries(models.Model): # NOTE: We have removed the primary key (unique…
Charalamm
  • 1,547
  • 1
  • 11
  • 27
2
votes
0 answers

Timescale: view don't auto update new data

I create a view like that: CREATE MATERIALIZED VIEW view_cdn WITH ( timescaledb.continuous, timescaledb.materialized_only = TRUE) AS SELECT time_bucket ( '5m', event_time ) AS times, pn_id, cdn_list, video_type, cdn_id, platform, …
Mr SOYK
  • 21
  • 1
2
votes
1 answer

There is any equivalent for TOP and BOTTOM in SQL that available in influxdb?

I am porting the queries in influx DB to timescaleDB (Postgres SQL). I am currently stuck in the TOP and BOTTOM functions. Is there any equivalent in Postgres SQL or any suggestions to achieve it? For constant one, I did like that, TOP('field', 1) …
srilakshmikanthanp
  • 2,231
  • 1
  • 8
  • 25
2
votes
1 answer

TimescaleDB Continuous Aggregation: How to store Continuous Aggregation Results

We're using the Continuous Aggregation to make some analysis from row data but i have some question about store logic. How TimescaleDB handle to store Continuous Aggregation result and normal Postgresql raw data table, i didn't find any result about…
Ogün Birinci
  • 598
  • 3
  • 11
2
votes
1 answer

How do I call a procedure in TimescaleDB?

I have a stored procedure that starts like this: CREATE OR REPLACE PROCEDURE my_procedure(job_id int, config jsonb) LANGUAGE plpgsql AS ... I don't really use the two parameters job_id int, config jsonb, I just have them because for you have to…
TheStranger
  • 1,387
  • 1
  • 13
  • 35
2
votes
1 answer

How do I create a scheduled user-defined action that trims rows in TimescaleDB?

I'm monitoring, collecting and storing event data for different organizations in my TimescaleDB. I have a TimescaleDB with one database. Each organization has its own schema in that database. Each schema has two tables: A device table and an event…
2
votes
2 answers

TimescaleDB - Counters

My goal is to query the delta of a counter metric over time using a continuous aggreate from TimescaleDB. I'm following the example from Running a counter aggregate query with a continuous aggregate I created the table: CREATE TABLE example ( …
Kurt
  • 353
  • 4
  • 14
2
votes
1 answer

Timescale run_job() cannot find defined FUNCTION/PROCEDURE

i am creating a PROCEDURE in TimescaleDB (which is based on PostgreSQL) like this: CREATE or replace procedure insert_oee() LANGUAGE SQL as $$ INSERT INTO public.oee_t1 (columns) (select some_columns from a_table) $$; Which…
2
votes
0 answers

Postgres Replication with no configuration access

I am currently working with a Managed Instance from TimescaleDB and have incoming data. Now, I am setting up another instance, but this time it will be self-hosted and managed by me. As such, I would like to setup some sort of replication so that…
jpcr3108
  • 35
  • 2
2
votes
1 answer

TimescaleDB high disk space usage despite compression activated

I have a TimescaleDB database running on Docker (which is running on Ubuntu). As you can guess, I store a lot of time-series data in it and to save disk space I activated a compression policy: ALTER TABLE measurements SET ( timescaledb.compress, …
2
votes
2 answers

timescaledb with spring data jpa

It's super simple to crank up a little service that persists to timescaledb in spring data. But while spring data will connect and create your schema from your model, it obviously doesn't create the hypertables that wrap your tables. What is the…
Arlo Guthrie
  • 1,152
  • 3
  • 12
  • 28
2
votes
0 answers

postgresql installs an extension, but does not expose the functions in it

I am using PostgreSQL 14. I have finally managed to build the timescaledb-toolkit for it (based on the alpine docker image) and now I get the control file, the library, everything. So, I execute CREATE EXTENSION timescaledb_toolkit; and there is no…
chronos
  • 325
  • 6
  • 12