TimeScaleDB Retention

Started by gmonk63, June 11, 2025, 07:51:53 AM

Previous topic - Next topic

gmonk63

Are there any default data retention policies setup for TS  ?   I have been trying to figure out why my DB is so bloated at 92GB I only have about 1K devices with only about 200 having about 10-20 DCI's the rest is icmp checks is this normal ?  I have NetXMS setup to only keep 30days of everthing being collected so Im wondering if the data is remaining for some reason.  


Using version 5.22 Debian 12


Thanks

Filipp Sudanov

For TSDB data is stored in the following tables - number in the name is the retention period

IDATA_SC_7
IDATA_SC_30
IDATA_SC_90
IDATA_SC_180
IDATA_SC_OTHER
IDATA_SC_DEFAULT

If you DCI retention time is "Default", then IDATA_SC_DEFAULT table will be used.
IDATA_SC_OTHER stores DCIs with duration longer the 180 days.

You can check size of these tables (and also TDATA_SC_* for table DCIs) in your database