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 UPDATE
s to old time intervals instead, you may observe significantly lower write throughput.
当前内容版权归 TimescaleDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 TimescaleDB .