I am using vertica for an application which has continuous flow of data. So I want to manage the disk space by creating a cron job which will delete the older records once the disk is 60% full. Could someone please help me to achieve the same.
Calculate the time interval that is covered by "60% of disk space".
If it's, for example, 2 years, then create your table: PARTITIONED BY YEAR(transaction_date)*100 + MONTH(transaction_date).
Then, once a day, for example, check if you reach 60% of disk space, using "df", for example, and collecting that command's output. If yes, then, run VSQL to drop the oldest partition. Check the Vertica documentation on the DROP_PARTITION() function.
Thanks for the reply. Could you please let me know how to create partition based on day to day.
There is a quite elaborate chapter on that subject in the administrator guide, which can be found here: https://my.vertica.com/docs/8.1.x/HTML/index.htm#Authoring/AdministratorsGuide/Partitions/PartitioningTables.htm?TocPath=Administrator's%20Guide|Using%20Table%20Partitions|_____0