An indication to remove one or more data in a time series database is received. A metadata index associated with the time series database is updated to indicate a soft removal of each data of the one or more data. A data hole index associated with the time series database is updated to indicate a data hole at a location of each data of the one or more data in the time series database. Responsive to an input/output rate for the time series database being below a threshold, the data hole of each data of the one or more data is optimized.