Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to free up vertica raw space after deleting records

We are using Vertica community edition which has raw data limit of 1TB.

recently reached 1 TB raw data limit so we decided to delete some records from all tables. After deletion of old records Vertica still shows Utilization : 104%

dbadmin=> SELECT GET_COMPLIANCE_STATUS();
GET_COMPLIANCE_STATUS
----------------------------------------------------------------------------------------
Raw Data Size: 1.04TB +/- 0.10TB
License Size : 1.00TB
Utilization  : 104%
Audit Time   : 2014-09-04 13:05:24.020979-04
Compliance Status : The database is in compliance with respect to raw data size.

No expiration date for a Perpetual license

NOTICE: Recent audits suggests a change in compliance status. We are awaiting additional data points to confirm.
(1 row)

Any idea how to free up that space ?

like image 497
roy Avatar asked Dec 02 '22 15:12

roy


2 Answers

Rows that were deleted using DELETE are marked for deletion and not immediately removed from physical storage. You need to wait for a mergeout to occur, advance the epoch, or run a PURGE. More information about purging deleted data is available in the documentation.

like image 56
Kermit Avatar answered Dec 06 '22 16:12

Kermit


Besides Kermit's answer...

Since deletes are expensive I used to put data on partitions, based around date, and after archiving the data somewhere else I would drop the partition.

like image 45
geoffrobinson Avatar answered Dec 06 '22 17:12

geoffrobinson