Hi,
timescaledb version : 1.7 +
postgresql version: 11 +
We need to drop device_id =‘1’ chunk , how to perform it please suggest.
below table details
CREATE TABLE test.data (
timestamp timestamptz NOT NULL,
device_id character varying(50) NOT NULL,
name text NOT NULL,
value double precision,
source text
);
SELECT create_hypertable(‘test.data’, ‘timestamp’,‘device_id’,16, chunk_time_interval => interval ‘1 day’);
insert into test.data values(‘2021-01-01 00:00:00’,‘1’,‘A’,10,‘DATA1’);
insert into test.data values(‘2021-01-01 00:00:00’,‘2’,‘A’,10,‘DATA1’);
insert into test.data values(‘2021-01-01 00:00:00’,‘3’,‘A’,10,‘DATA2’);
insert into test.data values(‘2021-01-01 00:00:00’,‘4’,‘A’,10,‘DATA2’);
insert into test.data values(‘2021-01-01 00:00:00’,‘5’,‘A’,10,‘DATA3’);
insert into test.data values(‘2021-01-01 00:00:00’,‘6’,‘A’,10,‘DATA3’);
insert into test.data values(‘2021-01-01 00:00:00’,‘1’,‘B’,10,‘DATA1’);
insert into test.data values(‘2021-01-01 00:00:00’,‘2’,‘B’,10,‘DATA1’);
insert into test.data values(‘2021-01-01 00:00:00’,‘3’,‘B’,10,‘DATA2’);
insert into test.data values(‘2021-01-01 00:00:00’,‘4’,‘C’,10,‘DATA2’);
insert into test.data values(‘2021-01-01 00:00:00’,‘5’,‘D’,10,‘DATA3’);
insert into test.data values(‘2021-01-01 00:00:00’,‘6’,‘C’,10,‘DATA3’);
Data is available up to today.
Each device_id have 10000 records for everyday.
Drop chunk is working based on time , i want to drop chunk based column (like device_id)