Need to know the best option to Purge the Data in CockroachDB

Hi Team CockroachDB,

  I would like to purge some of the old data in my table. I have some date column in my table and I need to retain only 6 months of data and rest of them can be purged. What is the best option in CockroachDB to avail this feature. Can we implement the range Partitioning in this Context ?
  Is it possible to schedule any automation jobs in CockroachDB to perform the Purging Activity?  Also I would like to know is there any TTL concepts available in CockroachDB so that after certain interval particular rows in the table got expired?

Thanks and Regards,
Abdul Rahim

Hi @rahimpk,

Product Manager at Cockroach Labs, here. Currently, we recommend using a scheduler like cron to execute SQL deletes following our docs here.

We are actively exploring row-level TTL in a future release, so I will add your use case to our research.

I have some date column in my table and I need to retain only 6 months of data and rest of them can be purged.

If TTL was available, do you still need to maintain your date column or would TTL from the last row update be ok?

Thanks for the information. If row-level TTL is present, we don’t need a date column. The date represents the Transaction date.
Moreover we are working in Gaia Cloud environment. We don’t have the command Line level Access. In this scenario what could be the alternate solution for that.
I have another Question. Can we achieve the purging using partitioning. If I can create a monthly partition for one of the date columns available in the Tables. Is it possible to DELETE the old partition as a part of purge activity.