Versions:

UPDATE commands

Updates in TimescaleDB work as expected in standard SQL (PostgreSQL docs).

UPDATE conditions SET temperature = 70.2, humidity = 50.0
  WHERE time = '2017-07-28 11:42:42.846621+00' AND location = 'office';

An update command can touch many rows at once, i.e., the following will modify all rows found in a 10-minute block of data.

UPDATE conditions SET temperature = temperature + 0.1
  WHERE time >= '2017-07-28 11:40' AND time < '2017-07-28 11:50';

warning

TimescaleDB achieves much higher insert performance compared to vanilla PostgreSQL when inserts are localized to the most recent time interval (or two). If your workload is heavily based on UPDATEs to old time intervals instead, you may observe significantly lower write throughput.

Found an issue on this page?

Report an issue!

Keywords

Related Content